Skip to content

Instantly share code, notes, and snippets.

@jrtashjian
Last active January 16, 2019 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrtashjian/f231538d7caba3fa8cc198b25dfc758e to your computer and use it in GitHub Desktop.
Save jrtashjian/f231538d7caba3fa8cc198b25dfc758e to your computer and use it in GitHub Desktop.
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