You want to look into the_terms
or its big brother get_the_terms
. It’s how you display custom taxonomies on the front end — similar to the_category
or the_tags
.
Example:
<?php
// somewhere in a template file, inside the loop
the_terms(
$post->ID, // object ID
'camps_tag', // your custom taxonomy
'<p><strong>Tags: </strong></p>', // before the list
', ', // between list items
'</p>' // after the list
);
Related Posts:
- Add category base to url in custom post type/taxonomy
- Display all posts in a custom post type, grouped by a custom taxonomy
- Ordering Posts List By Taxonomy Terms?
- has_term or in_category for Custom Post Types
- WordPress Custom Post Type Category Page
- post count is wrong when using same taxonomy for 2 different CPT
- Issues when rewrite rules collide?
- 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
- Archive page for taxonomy of custom post type
- CPT tax slug conflict with post type slug
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Exclude current post when getting related post on custom post type and taxonomy
- Display Posts of a Category in Alphabetical Order (Custom Post Type)
- 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
- Taxonomy.php Not Showing Posts
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Archive for custom taxonomy lists all posts instead of current taxonomy
- 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?
- Disable block with taxonomies at post page
- Sort and filter custom post type posts by custom taxonomy
- Terms showing up in object cache on unrelated pages
- 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)?
- Best way to specify “article type” in URL
- Rename a slug label
- List Posts By Custom Taxonomy
- WordPress menu with custom taxonomy
- attach CPT data to a taxonomy
- Remove taxonomies using register_post_type_args
- Different options per post type in WP_Query
- Change custom taxonomy archive permalink
- Display both parent and child custom taxonomy / content
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Creating a non-hierarchical Taxonomy that behaves like categories
- Get template part with CPT and Custom Taxonomy conditionals
- How to get xml file for a single post type?
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- Is there a way to make child posts inherit parent post terms?
- Custom post types category
- Query Custom Post by taxonomy multiple categories
- How to Control CSS Class Visiblity From WordPress Admin Panel based on Tax Terms
- Problem retrieving informations and displaying desired structure with custom post type and taxonomy
- Advanced archive url structure (category, tag and date)
- Setup page template array in a custom post type
- Best Way to Query Custom Taxonomies Used on Custom Post Type
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom taxonomy terms as children of multiple custom post types
- Custom Taxonomy and Categories
- custom taxonomy pagination 404 error
- Archive page of CPT’s custom Taxonomy
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- How to show related posts of category on post within custom posttype
- Not saving custom taxonomy while using ajax
- Dynamic template page calling shared taxonomies CPT or Plugin post type : how to clone taxonomy for plugin + set up dynamic shortcode
- Post Tags not working for Custom Post type
- Filter in Custom post type to find the parent post
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Listing all custom posts having a specific taxonomy whatever the terms
- Custom search for a custom post type in WordPress
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- Custom taxonomy with custom post type archive page
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Custom URL for Custom Post Type & Custom Taxonomy Term
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom Taxonomy page redirecting to 404 page
- Help with Travel Guide Setup
- Pretty permalink structure with multiple (AND OR) taxonomies
- Filter a custom taxonomy from displaying a button all other taxonomies can show
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- 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?
- WordPress Custom Post Type and sort by Tags
- 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
- Custom taxonomy labels won’t display
- 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
- the_post_navigation in single page with multiple taxonomies
- Url rewrite with custom post type and taxonomy
- Custom Sort Order for Custom Post Type Taxonomy
- How to add categories to a custom post type using wp_insert_post($new_post);