I have a wordpress blog with 2000 posts. Name of each post is a person's name. But the first name and last name are separated by a '-', I want to automate the process of removal of these '-' from the post names.
Example -
Present name of a post: Isaac-Newton
Desired name : Isaac Newton
Is there any script, or code to do it, as it will be a tedious job, If I have to manually edit the names of all the posts. Any help, suggestions what might work?
You could open the WP database in PhpMyadmin and run something like the following:
update wp_posts set post_title = replace(post_title, "-", " ") WHERE post_title LIKE '%-%';
Obviously backup the database first, to ensure you don't completely mess it up.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.