How do you update post date (year only) in a separate custom field?
So I was first looking for a way to loop through the existing posts, as suggested in Christine’s comment. Based on this answer, I created a basic plugin that runs the loop upon activation. // Run the loop when the plugin is activated register_activation_hook(__FILE__, ‘update_my_metadata’); function update_my_metadata(){ $args = array( ‘post_type’ => ‘post’, // Only … Read more