what about something like this on activation?
function wpa47153_run_once(){
$posts = get_posts(array('numberposts' => -1) );
foreach($posts as $p) :
$meta = get_post_meta($p->ID, 'meta_key',true);
if($meta) :
$my_post = array();
$my_post['ID'] = $p->ID;
$my_post['post_content'] = $meta . "<br/>" . $p->post_content ;
// Update the post into the database
wp_update_post( $my_post );
unset($my_post);
//remove the meta key
delete_post_meta($p->ID, 'meta_key');
endif;
endforeach;
}
where get_posts and get_post_meta are tweaked to your circumstance.
Related Posts:
- How can I retrieve multiple get_post_meta values efficiently?
- Using radio button meta data from a custom meta box
- Meta value does not save for scheduled posts
- How to I retrieve the ID from the Posts page?
- How to save meta checkbox WordPress
- Updating post meta for checkbox
- How can I tell if a post has been published at least once?
- Adding a meta box to determine the sidebar [closed]
- Simple Custom Metabox Not Saving
- Bulk Post update_post_meta
- How to add category to: ‘wp-admin/post-new.php’?
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- Code to make a post sticky
- Post/Page Publish/Update button not clickable once I make an edit
- Can I force a metabox to be in one column?
- How to add a new tab to page editor
- Listen to Post action
- Export WordPress Posts and Meta Information in CSV format
- Delete duplicated wp_postmeta record
- Will a large postmeta table slow a site down?
- Better post meta efficiency?
- Setting post meta data to random value during post status transition / on publish
- 1 column admin screen options – move submitdiv to bottom
- Change post format using custom field
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- Exporting Data from WordPress into a flat table
- How do I allow users to follow a post and then allow admins to email all users who have followed that post?
- Save list from a custom meta box?
- Using Custom Posts with Metaboxes and Drop-downs
- Syndicated Posts when Updated Lose HTML tags
- How do I batch create revisions of all posts?
- What Is meta_id In wp_postmeta?
- Post update RSS notification plugin
- Add custom field automatically (add_post_meta) with value based on number of words of article
- Change the post date from a meta box
- How to generate numbers indistinguishable for the IDs of the posts
- Understanding and using metaboxes in posts
- Save re-arranged draggable post items to wordpress database
- Change post_date to post_modified date on post template?
- Dashboard :10 Last draft page and 10 last pending review page (metabox)
- custom post scheduler for drafts
- Custom Posts Query and meta_query Sort Order
- Getting value from get_post_custom
- Calling Different Custom Post Timestamps in a table
- Simultaneous admin updates causes custom fields to not update
- Saving custom fields to a custom taxonomy
- Do action on publish or update?
- Customize rel=canonical tag for single blog post
- Change all author links in Blog roll
- Is there any way to tell when wp_postmeta has been updated?
- Hide custom metabox value from custom fields
- Get post meta retrieving wrong value
- Change post author without using wp_update_post()
- if in category but only with post meta
- Posts Missing in Dashboard after update
- wp_query with ajax
- wp_update_post creating revisions instead of updating the post
- Display post number by category
- Saving Post Data in Another Database
- Automatic blog page with custom design [closed]
- Show number of posts by logged in user
- How does WP decide how to display a page
- Adding JS functionality to the Publish button in wp-admin/post.php
- When sending a newsletter -not with wordpress- the server has 100% cpu [closed]
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Insert data from custom created PHP page into wp_postmeta table
- saving/reading custom field value does not work – no value gets POSTed
- Get post category as a separate string and url
- Display content between two dates?
- Select another post in a post meta like a parent page is selected while editing a page
- Private post caught in endless redirect loop
- What is proper filter or hook action to add data to the $post object?
- Set a post expiration and delete a post when expirate
- Blogposting Schema & Structured Data without plugin
- Display Updated Date Instead of Published Date
- How do you update post date (year only) in a separate custom field?
- Add postmeta to all blog posts
- Re-order Category Meta-data
- How to hide meta from search result only on pages?
- Grab meta data before post is saved
- How to fetch posts that are stored in the different table than the default table (wp_posts)?
- alt of attached image in post / pages
- Get the correct meta_value with get_post_meta
- Filter question list on substring of metavalue
- Add meta box for Featured Image caption in wp-admin/post-new.php
- Meta boxes not saving
- Edit post meta direct from post.php?
- Add custom class to existing menu items from custom meta
- Some comment box wordpress in 1 post [closed]
- How to Test a Blog Post for Update vs. Publish Status — Unique
- Display metabox with date
- How can I create a menu items from meta box based on users input
- Show related (archive) month and year to post
- How enter custom post meta or custom field on box post list archive page?
- WP_query sort by custom meta_key “price”
- How can I use wp_after_insert_post with $current_screen?
- What effect can a large wp_post table have on overall site performance?
- WordPress Post Updating is Not Working
- How to make internal links creating plugin to respect ACF?
- Translation related post text to Arabic