How to set default category for custom post type ?
-
I set custom post type and i added taxonomy (category) to in it. But i couldn’t add default taxonomy (category). I have searched about 2 or 3 hours but i have nothing.
Let me describe more. For example, when you write something in post and published, if you didn’t set category, WP assign “Uncategorized” category automatically. I want it to assign a default taxanomy for my custom post type like that.
Here is my code :
register_taxonomy('gallery_cat','gallery',array( 'hierarchical' => true, 'label' => __('Gallery Category','yacht'), 'query_var' => true ));
I am waiting your helps. Thanks.
- The topic ‘How to set default category for custom post type ?’ is closed to new replies.