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?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Add Settings to Custom Post Type
- Archive page for taxonomy of custom post type
- Create Custom Post Type Archive Page with Sub Categories Navigation Sidebar
- Custom taxonomy template not working with simple loop. Multiple CPT using the same taxonomy
- Is there a way to list posts of only a certain category
- Getting all custom posts with a certain category
- Query Custom Post Types & category_name?
- How do I get the child category posts from a custom post type?
- Custom post type archive page pagination
- Navigation menus not showing because of custom post type filter
- Return array of categories to php function for current post
- How do I get the permalink structure to work like this?
- wp_list_categories() – current-cat class also inside posts?
- Post injections into Site Origins Page builder [closed]
- Why is my category template ignoring post type?
- Not sure if I should create multiple custom post type [closed]
- Custom post types and category archive
- Categorise Custom Post Types
- in_category for custom post types
- Listing all slugs?
- List categories, subcategories and posts from custom taxonomy and custom post type
- Categories won’t appear on custom post type
- Custom Post Type with Configurable Sidebar via ACF
- Custom post types category
- Archive page for custom post type and custom taxonomy
- Archive page of CPT’s custom Taxonomy
- Custom post category name showing empty
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- How to show related posts of category on post within custom posttype
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Sudden 404 pages on product category archives
- CPT tags not showing when editing post
- ACF Pro Accessing fields on a Custom Post Type
- Convert category to custom post type
- How can I display a specific category on Front-Page
- Custom taxonomy with custom post type archive page
- How to seperate posts by categories?
- WooCommerce change
- I can not call the categories of custom post type
- Custom Post Type is not respecting assigned categories
- Help with Travel Guide Setup
- Custome post type “tags” pick default archive instead of custom post type archive
- Project Category Heading
- Getting Custom post category from Form
- How can I generate a list of post-type specific categories?
- Custom post tag images not displaying with ACF
- Front end page submission form does not attach custom post type
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- WordPress Custom Post Type and sort by Tags
- Archive page of filtered posts
- Category slug not showing for Custom Post Type
- Get a list of categories ids
- Custom Post Type Permalinks with %category%
- Archive Page Pagination not working
- single-mySlug.php works: archive-mySlug.php does not. Custom Post Type
- has_archive for default post type
- Pagination for Custom Post Type with Multiple Types
- Custom Post Type Archive Title Lowercase
- What Is My Fault With This WP_QUERY ? [ Pagination Problem ]
- Custom Post Types Permalink
- How to add categories to a custom post type using wp_insert_post($new_post);