I imported a blog to WordPress and it has over 300 posts. I noticed it didn’t put the categories to the WordPress posts, but it did import all the category names. Luckily, the category name is in the post name (for ex. ‘Science – Earth Is Round’ would be the post title and ‘Science’ would be the category). Since the categories all exist, is there any way I could run a script that would look in the post title to see if any category matches text that it is in the title, and if so set that as the category?
- The topic ‘Any way to get the category name from the post title?’ is closed to new replies.