Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
function vmf_query_filter($query) {
if ( ! is_admin() && $query->is_main_query() && $query->is_home() ) {
$query->set( 'post_type', array('post', 'page', 'portfolio', 'product') );
};
return $query;
};
add_filter('pre_get_posts', 'vmf_query_filter');
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.