Get Tags for Custom Post Type

At present, there is no post_type parameter included in any core WordPress function or efficient solution which enables you to display a list of tags without displaying ALL tags. And it doesn’t look like the existing WordPress functions will be extended to enable you to control which tags are displayed.

The code in this tutorial enables you to display a list of tags for one or more custom post types and/or custom taxonomy types. You can control which tags are listed and display theme inline.

There’s 3 different code snippets included in this solution. You may only need to use 1 or 2 of them depending on how your existing custom post type is coded, what it supports and whether you want your single CPT pages listed in your archives.

Here’s the code for logged in members:

Related Code

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.