I'm using this to exclude a particular category from the loop. It DOES that, but it also does this: On my PAGES, it displays the posts from the categories other than this one which is excluded.
/** Replace the standard loop with our custom loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'child_do_custom_loop' );
function child_do_custom_loop() {
global $paged; // current paginated page
global $query_args; // grab the current wp_query() args
$args = array(
'category__not_in' => 7, // exclude posts from this category
'paged' => $paged, // respect pagination
);
genesis_custom_loop( wp_parse_args($query_args, $args) );
}
genesis
tag (is it correct?). But it would be nice if you specified that in the Q title (genesis loop). What does thatgenesis_custom_loop
function does? Is it relevant to the Q?