get( 'category_name' ); if ( isset( $category_name ) && ! empty( $category_name ) ) { // Now we have the category name, but we want more so we're going // to get the full category details using the slug name. $category_all = get_category_by_slug( $category_name ); // Now that we have all of the category details, we can safely // extract the category ID. $category_id = $category_all->cat_ID; // Using the category ID we just obtained, we can get all the children // of this category (returned in an array). $category_children = get_term_children( $category_id, 'category' ); // And now we just need to pass this array of children to exclude // into $wp_query. We'll use query_posts() for this. Don't forget // to merge in all of the previous arguments. query_posts( array_merge( $wp_query->query, array( 'category__not_in' => $category_children ) ) ); } ?>
>

".__("Sorry, but there aren't any posts in the %s category yet.", 'kubrick').'', single_cat_title('',false)); get_search_form(); endif; ?>