WordPress tags only display default posts on their page. In order to display custom post type in tags page, you will have to add your post type in default query of the tag.
Add below code in your functions.php and add custom post types in $post_types array which you want to display on tags page.
function add_custom_types_to_tax( $query ) {
if( is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
// Get all Custom Post types
//$post_types = get_post_types();
// Get Specific Custom Post types
$post_types = array( ‘post’, ‘your_custom_type’ );
$query->set( ‘post_type’, $post_types );
return $query;
}
}
add_filter( ‘pre_get_posts’, ‘add_custom_types_to_tax’ );
Hope this helps..!!
Related Posts:
- List all the tags from a custom post type
- Find callback function for custom taxonomy metabox
- Show certain terms from custom taxonomy but exclude ‘parent’ terms?
- How to search from specific post type with tags?
- associate custom post type with tags with specific pages
- Is it possible to make tag archive page specific to Custom Post Type?
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- How to make a custom taxonomy selectable in post publish area?
- Add Tags to custom post type
- Can custom taxonomies items have attached properties?
- Change Permalink Structure for Tag.php template
- search also in taxonomy, tags and custom fields
- Listing tags from a custom post type
- Show all tags on custom post type
- Best way to specify “article type” in URL
- Display posts with tag for custom post type only
- How to list tags from custom post type attachments?
- Why does my taxonomy have a category style div id?
- portfolio custom type tags support
- How can I create an automatic drop down menu with my tags?
- display custom taxonomies limited to custom post type?
- The Difference Between Categories and Tags and Taxonomies and Terms
- Print all the tags from a custom post type
- add custom tags for custom post type in wordpress
- Advanced archive url structure (category, tag and date)
- Search CPT by tag ids
- How to set “section categories”?
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- CPT tags not showing when editing post
- How to add independent “Tags” to Custom Post Type?
- Add tags to a “pending” post before publishing
- Custom Post Type tag taxonomy “Page Not Found”
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Loop multiple taxonomy in custom post
- Generating List of Tags from Custom Post Type
- Archive.php is not displaying tags
- WordPress Custom Post Type and sort by Tags
- get tags from custom post type
- Tags and Taxonomy links not working for Custom Post Types
- Attaching multiple custom taxonomies to one CPT?
- Add category base to url in custom post type/taxonomy
- Custom Post Type Permalink / Rewrite not working immediately
- How can I include custom post types on a tag page?
- has_term or in_category for Custom Post Types
- WordPress Custom Post Type Category Page
- how to group custom post type posts by custom taxonomy terms
- Showing current taxonomy terms
- Unable to save custom taxonomy terms in a custom-built metabox
- Show ACF field from custom taxonomy and display on the single template
- Custom post types, taxonomies, and permalinks
- How can I display my custom metaboxes on a custom post template?
- How to specify URLS for custom posts & taxonomies
- Custom Post Type permalink shows wrong page: homepage/index.php
- using $wpdb to get custom post type with term
- Categories sorting
- WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term
- Allow user to set custom order to a list of custom taxonomies?
- Add tag to a custom post type doesn’t change the total of custom post type in backend
- Custom Post Type Pagination Paginates Only in URL Structure
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Rename a slug label
- Dynamically insert an article at the top of a taxonomy archive – or?
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- How to show list of taxonomy terms associated with specific post?
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Filter posts by specific custom category and current tag
- Help on Custom Post Types
- Display featured posts for a custom post type by taxonomy
- Why doesnt my tag page populate with this custom post type?
- What is the most efficient way to execute recursive complex queries?
- 2 custom post type paging in 1 custom taxonomy
- WordPress REST API V2: “{CUSTOM_POST_TYPE} matches Term ID List and Term ID Taxonomy Query, but should match only one.”
- Duplicate slug/permalink issue while adding same post name
- Remove custom permalink base from CPT custom category and custom tags
- get taxonomies from terms
- Change Search display for Custom Post Type
- WooCommerce – Custom related product (Spareparts)
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom Taxonomy page redirecting to 404 page
- Pretty permalink structure with multiple (AND OR) taxonomies
- Filter a custom taxonomy from displaying a button all other taxonomies can show
- Problem with type plugin and custom taxonomies
- WordPress Custom taxonomy template
- How can I add a “fake” parent into the permalink?
- Custom post type – two taxonomies
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Check if taxonomy is attached to at least one post in a post-type
- Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]
- Display custom taxonomy posts of custom post types
- Looping taxonomy in taxonomy?
- Missing categories for Custom Taxonomy and Custom Posts
- Show one of the taxonomies always as default
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
- Create a hierarchical list of posts that’s grouped and nested by category
- Show a wordpress custom post condtionally using a category term