Ready to get started?Download WordPress


Any way to get the category name from the post title? (1 post)

  1. shawnjames95
    Posted 6 months ago #

    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?


You must log in to post.

About this Topic