Category and Tag archive pages only query for the post
post type. If you want custom post types to appear on those pages, you need to modify the query via pre_get_posts
to add additional types.
function wpd_womens_blog_taxonomy_queries( $query ) {
if ( ( $query->is_category() || $query->is_tag() )
&& $query->is_main_query() ) {
$query->set( 'post_type', array( 'post', 'womens_blog' ) );
}
}
add_action( 'pre_get_posts', 'wpd_womens_blog_taxonomy_queries' );
Related Posts:
- Load custom posts with same tag as page
- Display Next/Prev when looping Custom post-types archive?
- Search doesn’t find tags or categories in custom post types
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- CPT Archive with core Category
- Group posts by custom post type
- Custom post types and tag archive pages/permalink structure issue
- Custom post type getting wrong categories and tags
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Cross reference custom post types
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Tag page only display 10 posts
- Meta data (Tags and Categories) for Custom Posts not showing.
- Why does my taxonomy have a category style div id?
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- The Difference Between Categories and Tags and Taxonomies and Terms
- Custom Post Type Custom Archive Page Not Working
- Custom post type category permalinks and archive pages
- Custom post type, taxonomy and admin bar
- CPT archive page – show one post from each taxonomy term
- Advanced archive url structure (category, tag and date)
- get taxonomies from terms
- How to set “section categories”?
- Only show categories that have posts within custom post type
- Custom post types not displaying per category
- How to Show all Values in category.php page using post_type
- Help with Multi Level Category Archive Page
- Do not output category and tag URLs
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Custom Post Type – Admin Columns
- How can I set up the URL for a category archive for a custom post type?
- Show custom post type on post category page doesn’t work / breaks navigation
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP
- Add custom post type settings to wordress default posts
- Use Custom Post Type archive page for the taxonomies term archive page
- Display custom post type category, while in a CPT category, then the posts beneath
- Hide parent categories when clicked, and show it’s childs
- Limit amount of posts made within a custom taxonomy
- Problem with displaying posts in the CPT category
- Filter CPT posts by one or more categories
- Getting categories of posts under a custom taxonomy
- Custom Post Types with a common category for a blog listing
- Can’t remove front from permalinks for custom taxonomy category page
- How to get categories linked in posts for a specific post type
- Custom post type, organized by categories
- Remove CPT name from permalink but add %category% instead
- Single post with a Custom Post Type returns 404, when archives of the CPT work correctly
- Set a checkmark in a category based on a URL-parameter
- CPT archive admin menu label
- Number of Custom Post Types published are not being shown in the custom page
- WP Query with categories only shows one post and ignores the category
- Custom post type archive page blank
- 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
- Custom Post Type has_archive
- Get the category from custom post type
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- Custom Post Type Archive URL is wrong
- How to create a gallery page with categories?
- Creating a Custom Post Type
- 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.
- Custom Post Type slug same as page name
- Loop filtering Custom Post Types and/or Categories
- How to display custom post in archive section of the wordpress page?
- Content Editable CPT Archive?
- School & class blogs: Categorize with categories or custom posts?
- Custom post type and category link together
- list archives per post types
- 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
- Canonical url differs from custom post type archive URLs
- Not sure if I should create multiple custom post type [closed]
- Display a custom posts page for post type
- Make a custom_post translatable
- Pre-selecting the category for a custom post type
- Custom post type archive pagination 404
- posttype/taxonomy/term archive page 404 error
- How to get all tags of a custom post type by id
- Is it possible to have a custom post type with feed but without the archive?
- browse by category and tags?
- I am trying to hide a custom post type category to logged in users with Pre_Get_Posts
- 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
- Ignoring slug capitalization on rewrite rule for custom post type archive page
- 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?
- Paginate_links in custom post type template