Automatic category creation and category is post title
-
Been racking my brain (and google) trying to figure this out.
What I want is for every post to automatically create a category that matches the post title. So, if I create a post title “Look at me” I want a category to be automatically created also called “Look at me”.
I’ve tried using wp_set_object_terms like so:
$cat_ids = array(9992);
wp_set_object_terms( $post->ID, $cat_ids, echo get_the_title() );but no dice.
Any ideas??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Automatic category creation and category is post title’ is closed to new replies.