Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

add categories to custom post type

All you need to do is add this line in the arguments for your custom post type.

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


It is likely that you may already have this line in the existing code for your custom post type with some other custom taxonomy in it. If you do, then you just need to add a comma after that and add a category, like this:

'taxonomies'          => array('topics', 'category' ),
Source by www.wpbeginner.com #
 
PREVIOUS NEXT
Tagged: #add #categories #custom #post #type
ADD COMMENT
Topic
Name
3+1 =