I’d really like to take all of my old posts, and automatically use the meta descriptions we have written â currently done for each post using All In One SEO Pack â and copy them to also be our post excerpts.
The custom field used by AIO SEO description is _aioseop_description
.
Would anyone have any idea how to accomplish this?
Please, backup your database before running this.
The code is pretty straight forward and tested in a local WordPress.
The advice is just for precaution sake, as I suppose you’re dealing with a live site.
Copy the code into a PHP file, upload it to the plugins folder and activate.
posts
post type and check if it has an excerpt.Documentation:
register_activation_hook
,get_posts
,get_post
,wp_update_post
.I couldn’t find the answer for this, so I developed a plugin that will add the description from the All in One SEO Pack and save it as a description for all the posts in your WordPress blog.
You can download it from here. Be sure to backup your database first.