post_parent ) { // test to see if the page has a parent $parentID = $post->post_parent; // the ID of the parent is this return $parentID; // return the ID } else { // there is no parent so... return false; // ...the answer to the question is false }; }; ?> ???????? ??? «????» category_parent; } ?>

'post', 'child_of' => '21', 'orderby' => 'name', 'order' => 'ASC', 'hierarchical' => false, 'hide_empty' => false, 'pad_counts' => false ); $categories = get_categories( $args ); foreach ($categories as $cat) { if(!(preg_match("/(?<=\-wtp\-)(\s+)[A-z0-9А-я-.\s]+/u", $cat->name, $matches))) { if ($cat->term_id!=$curcat) { echo ' '; } else { echo '