Skip to content
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design
    • code notes
Blog Web Dev WordPress Enable Tags for Custom Post Type

WordPress Enable Tags for Custom Post Type

By Forrest Smith - Drempd.com

Just add this line when you register the post type:
'taxonomies' => array('category', 'post_tag')

So something like this for all of the code:

register_post_type( 'customtype',
   array(
      'labels' => array(
         'name' => __( 'CustomType' ),
         'singular_name' => __( 'CustomType' )
      ),
      'supports' => array(
         'title','page-attributes','description','editor', 'thumbnail'
      ),
      'public' => true,
      'has_archive' => true,
      'rewrite' => array('slug' => 'customtype'),
      'taxonomies' => array('category', 'post_tag')
   )
);

Posted on May 24, 2022August 26, 2022 in Web Dev

drempd | san diego, ca


home contact

adventures san diego projects stream sometimes weeklies website design

portfolio resume san diego web design freelance web designer

custom web design responsive web design website maintenance