Skip to content

Instantly share code, notes, and snippets.

@jrtashjian jrtashjian/functions.php
Last active Jan 16, 2019

Embed
What would you like to do?
Filter: curatewp_section_object_query_args
<?php
add_filter( 'curatewp_section_object_query_args', function( $query_args, $section ) {
// Alter the query args for a specific section.
if ( 'your-section-name' === $section->post_name ) {
$query_args[ 'category__no_in' ] = [ 2, 54 ];
}
// Pass back the altered query arguments.
return $query_args;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.