I have a custom post type called Reviews, and I have some code in a plugin to make it so that it displays in archives and the loop, etc.
For some reason, if the lines of code below are active in my plugin, the menu at the top of my page disappears. I’m fairly sure this wasn’t always the case.
function add_post_types_to_loop_and_feed($query) {
if ( is_home() || is_feed() || ( is_archive() && !is_admin() ) ) {
$query->set('post_type', array('post', 'reviews'));
}
}
add_action('pre_get_posts', 'add_post_types_to_loop_and_feed');