• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Use Categories and Tags With Your Custom Post Type

Once you create a custom post type, you can either:

  1. Add support for creating custom taxonomy types to your existing CPT code
  2. Or add support for categories and tags just like your regular posts

There’s at least 2 ways to enable categories and tags for custom post types.

You can include this line of PHP code in the code you use to register a custom post type:

'taxonomies' => array('category', 'post_tag'),

Or you can add a new function like this:

add_action('init', 'add_category_tags_to_cpt');
 function add_category_tags_to_cpt() {
    register_taxonomy_for_object_type('category', 'your-cpt-name');
    register_taxonomy_for_object_type('post_tag', 'your-cpt-name');
}

Either method will add meta boxes on Edit screens for both Categories and Tags to all your single CPT’s.

Related Tutorials

  • Add Tags To Pages
  • Get Tags for Custom Post Type
  • Add Categories & Tags to AgentPress Listings Plugin
  • How To Add Post Tags To Pages

Custom Post Type Post Categories

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags