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 check if post meta key exists or not in wordpress database
- 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
- How to allow hidden custom fields to be added from wp-admin/post.php?
- 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
- How to add metabox for post of specific category
- Will a large postmeta table slow a site down?
- Update all posts automatically when using post_meta
- upload image in a meta box
- Updating a post without escaping ampersands?
- Change slug with custom field
- Update post date on every new comment?
- Better post meta efficiency?
- Setting post meta data to random value during post status transition / on publish
- meta_box or custom_field as a second tinymce post-instance?
- Edit meta data does’t work with custom sql
- 1 column admin screen options – move submitdiv to bottom
- multicheck box for post metabox
- Mass Update lines of code for all posts
- Create A Metabox For A Custom Field
- Human Time Diff, change mins to minutes
- Change post format using custom field
- Have save_post write to database image meta [closed]
- Unable to modify(update) posts – Page not found
- Does WP get all post_meta on POST page?
- Sanitizing `wp_editor();` Values for Database, Edit, and Display
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- Exporting Data from WordPress into a flat table
- Adding Multiple Values to a Post Meta Key
- 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?
- PHP Notice error (when on 404 page)
- What Is meta_id In wp_postmeta?
- Post update RSS notification plugin
- Checking if a post with certain meta value exists
- How to permanently delete a post meta entry?
- Add custom field automatically (add_post_meta) with value based on number of words of article
- Change the post date from a meta box
- Automatic value for custom fields for posts
- How to generate numbers indistinguishable for the IDs of the posts
- Modify WP_Post before processing
- How to rename “Publish” metabox title in post screen
- Understanding and using metaboxes in posts
- Save re-arranged draggable post items to wordpress database
- WordPress version 3.8 – Preview button not working for editor
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- Change post_date to post_modified date on post template?
- Create post for every user?
- Image Insert into posts and pages not working after 3.2.1 update
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Dashboard :10 Last draft page and 10 last pending review page (metabox)
- custom post scheduler for drafts
- If modified on same day, show only time
- How can I sort posts by the date and a custom meta field?
- is there a way to show the the post title after the image?
- Get Meta Key Value While Saving Post
- check if wordpress is updating or publishing a post
- Adding custom fields to bbpress reply form
- Force the “Choose from the most used tags” meta box section to always be expanded
- Custom Posts Query and meta_query Sort Order
- How to compare two posts including their meta fields on a scalable base?
- Getting value from get_post_custom
- Calling Different Custom Post Timestamps in a table
- Simultaneous admin updates causes custom fields to not update
- Can’t update old posts 3.5.2
- Is it possible to paste a link without tags and make it directly a link in a post?
- Cannot retrieve a custom RSS field from posts
- Saving custom fields to a custom taxonomy
- Do action on publish or update?
- How to automate featured posts number? [duplicate]
- Customize rel=canonical tag for single blog post
- Change all author links in Blog roll
- How to calculate the average of a post meta value(Numeric) of a specific author
- Is there any way to tell when wp_postmeta has been updated?
- Hide custom metabox value from custom fields
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- Get post meta retrieving wrong value
- wpColorPicker – problem with implementation to post meta
- Upload attachment from external site
- Change post author without using wp_update_post()
- Show metabox value last post excerpt, title and link