Last active
January 16, 2019 18:36
-
-
Save jrtashjian/f231538d7caba3fa8cc198b25dfc758e to your computer and use it in GitHub Desktop.
Filter: curatewp_section_object_query_args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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