Old thread, but for anyone interested in using Advanced Custom Fields alongside Revive Old Post in order to make good use of the custom fields functionality:
1) First create your Advanced Custom Field using the interface in the dashboard like you normally would.
2) After saving, click on “Screen Options” at the top left of the custom field form page, and change “Show Field Key” to yes. You should see the column Field Key appearing on the recently created field.
3) Open the functions.php of the active theme and add the following:
function twitter_tag_postmeta() {
global $post;
// get new value
$value = get_field('field_key');
if ($value) {
update_post_meta($post->ID, 'tweet_tags', $value);
}
}
add_action('acf/save_post', 'twitter_tag_postmeta', 20);
Where get_field('field_key');
should have the field key copied from the ACF column and update_post_meta($post->ID, 'tweet_tags', $value);
should have the desired custom field to be used for the Twitter hashtags. What this does is saving the custom field in the post meta, so it can be used by Revive Old Post.
Hope this is useful to somebody else.
-
This reply was modified 8 years, 2 months ago by AntaresMHD.
-
This reply was modified 8 years, 2 months ago by AntaresMHD. Reason: Clarity