Hi
I have page layout for a custom post type, i want to display certain posts created the author of the page, i have created a filter and placed in functions.php in order to not display certainCPT categories
add_filter( ‘cs_looper_query’, function( $query, $args ) {
if ( isset( $args[‘name’] ) && $args[‘name’] === ‘author-shows-classified’ ) {
if ( ! isset( $query[‘tax_query’] ) ) {
$query[‘tax_query’] = array();
}
$query[‘tax_query’][] = array(
‘taxonomy’ => ‘show-category’, // confirmed taxonomy slug
‘field’ => ‘slug’,
‘terms’ => array( ‘past_productions’ ), // confirmed term slug
‘operator’ => ‘NOT IN’,
);
}
return $query;
}, 10, 2 );
I am using this as query string;
name=author-shows-classified&post_type=shows,classified&author={{dc:author:id}}&posts_per_page=5&orderby=date&order=DESC
But its failing to display posts? Is there something wrong?
Kind regards