bloqhead
11/4/2013 - 9:13 PM

update_post_meta_example.php

<?php
$args = array (
	'posts_per_page' => '-1', // all posts
	'post_type' => 'your-post-type'
);
global $post;
query_posts($args);
while ( have_posts() ) : the_post();
	update_post_meta( $post->ID, 'field_slug', '' );
	update_post_meta( $post->ID, '_field_slug', 'field_key' );
endwhile;
wp_reset_query();
?>