WordPress tutorial, wordpress add tags to custom post type. we can create the custom post type. In this tutorial I will show you to add category and tags.
wordpress add tags to custom post type
You just need use the following code in your arguments.
'taxonomies' => array('category', 'post_tag') // this is IMPORTANT
Here is full code which is I used in functions.php file
add_action('init', 'wordpress_themes'); function wordpress_themes() { $wp_themes_args = array( 'label' => __('Wordpress Themes'), 'singular_label' => __('Wordpress Themes'), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => true, 'supports' => array('title','editor','author','thumbnail','excerpt','comments'), 'taxonomies' => array('category', 'post_tag') // this is IMPORTANT ); register_post_type('wordpress-themes',$wp_themes_args); }
WordPress tags support is so much important for SEO. Really helpful article. Learn new thing about custom post type and wordpress tags.
It’s all in one line right. Thanks for informing