Is there any way to update all the posts at a time through query or through admin panel.
For an example i am having an 1000 posts, how to update all the posts at a time.
Thanks.
Is there any way to update all the posts at a time through query or through admin panel.
For an example i am having an 1000 posts, how to update all the posts at a time.
Thanks.
You must be logged in to post a comment.
1) Create a new page and assign a new page template to it, lets say site.com/update and update.php. Inside of update.php write you bulk mechanism:
You could place this anywhere in your theme but I like to create a page for that so I can easily run a cron job with it.
Next the function to change the slug of every newly created post:
The code above runs every time a post gets saved (e.g. when published for the first time) and sets a new post_name to the part no.