Custom post type in front page erase main menu
-
I have events with plugin eventribe and I want to show events together with posts in home page – blog section – and in category query.
Eventribe has the flag “put events in main query” but it does not work with hestia.
So I create a plugin with a very simple function for hook pre_get_posts:
function any_type_pre_get_posts( $query ) {
if ( is_front_page() or is_category() ) {
$query->set( ‘post_type’, any );
}
return $query;
}It works, but main menu disappear! any help?
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom post type in front page erase main menu’ is closed to new replies.