Skip to content

Instantly share code, notes, and snippets.

@avclark avclark/CPT Loop
Created Nov 10, 2014

Embed
What would you like to do?
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() && $query->is_main_query() )
$query->set( 'post_type', array( 'Resources' ) );
return $query;
}
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.