add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if( is_category() ) { $post_type = get_query_var('post_type'); if($post_type) $post_type = $post_type; else $post_type = array('nav_menu_item', 'post', 'movies'); // don't forget nav_menu_item to allow menus to work! $query->set('post_type',$post_type); return $query; } } /*Displaying Multiple Post Types on Category Page By default the category pages on your WordPress site will only display the default ‘Posts’ post type. To display your custom post types on the same category page as your default posts, you need to add this code into your theme’s functions.php or a site-specific plugin. ref:https://www.wpbeginner.com/wp-tutorials/how-to-add-categories-to-a-custom-post-type-in-wordpress/ */