This may be overly simplistic, but have you tried changing is_home()
to is_category()
, in this line:
if ( is_home() && false == $query->query_vars['suppress_filters'] )
i.e. change it to this:
if ( is_category() && false == $query->query_vars['suppress_filters'] )
Worth a shot, anyway…
Related Posts:
- Showing posts from different categories and from custom post type
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- Problem to show custom post type in archive page category wise
- Custom post type, organized by categories
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Remove CPT name from permalink but add %category% instead
- Set a checkmark in a category based on a URL-parameter
- WP Query with categories only shows one post and ignores the category
- Adding custom post type to count in category
- How to edit this code to get the categories in achieve page?
- Category with post type pagination returns 404
- Custom Post Type and Category Base Rewrite Issue
- Get the category from custom post type
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- How to create a gallery page with categories?
- Custom Post Slug same as Parents Category Slug
- WordPress posts page for customer filtering and sorting along with category filter
- I am having Trouble to get list of Categories of Custom post Type
- Hierarchy and access control for Custom Post Types (CPT)
- Multiple (two) category postings on the same page.
- Loop filtering Custom Post Types and/or Categories
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- Why is my category template ignoring post type?
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- How to get custom posts sub category link
- Custom Post Type Archive Error, Takes Last Post as Title and Doesn’t Work
- Not sure if I should create multiple custom post type [closed]
- Cross reference custom post types
- Make a custom_post translatable
- Pre-selecting the category for a custom post type
- browse by category and tags?
- Categories filtering in new post
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom post types and category archive
- List of Posts and Categories
- How can I show 1 featured post in a styled element, and the next few below differently styled
- How do you create a custom template to display a category with an image and related posts below?
- How can I list Custom Post Types created with the Types plugin under categories?
- List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom templates for a specific category
- CPT category hierarchy
- Categorise Custom Post Types
- WP the_posts() on single-cars.php get category link
- Category.php template for custom posts
- How to retrieve category of a post in have_post loop?
- Categories and tags for custom post types
- Create new custom post and post category of same name
- Tag page only display 10 posts
- category page for custom post type
- in_category for custom post types
- Query multiple taxonomies with pre get posts
- Main menu not appearing in custom post type archive
- Get parent category id from child category page for custom taxonomy
- Getting used tags per post type
- Archieve.php not loading for custom post type
- multiple custom post type on category page
- Category archive in with conjunction with custom post type is empty
- Can I restrict category availability?
- WP_Query Custom Post Type if Category ID Equals
- Why does accessing url by category cause issues with post types?
- Custom post types and ‘new WP_Query’
- How can I have different content for different countries?
- How to add current custom taxonomy slug to body class
- Assign category a default post type
- Meta data (Tags and Categories) for Custom Posts not showing.
- Navigate posts with different post type that are in the same categories
- Excluding a Custom Post Type with a specific tag using pre_get_posts
- List Posts By Custom Taxonomy
- get_category_link() for custom post type does not include custom slug rewrite?
- How to Display Posts From Category Within a Custom Taxonomy?
- Showing custom post type categories in the menu
- Disable custom taxonomy on admin bar
- Why does my taxonomy have a category style div id?
- Targeting categories in custom fields
- Creating Sections for Post Types
- Custom post types with categories in template
- Invalid Taxonomy
- Need help deciding on a taxonomy
- Displaying Custom Posts
- Category Icon on custom post type
- Listing all slugs?
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Assigning a category to a custom post type in WordPress
- how to show records that don’t have custom meta value
- Stores category posts in an array
- CPT is simply not displayed in the main archive with “pre_get_posts”
- Get Posts by Category, Tag , and CPT Taxonomy
- category list with cutom post count
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- The Difference Between Categories and Tags and Taxonomies and Terms
- Include custom post type custom taxonomies in Categories widget
- Unable to edit categories in custom post type
- Get category if used in a custom post type
- Custom Post Type Category URL
- Want a custom query with just one category but from all custom post types
- Custom Post Type Categories URL not displaying posts