Is it possible to save the content (inside the WP WYSIWYG (the_content
)) into a custom field?
This is what I have so far:
add_action('edit_post', 'save_content_to_field');
function save_content_to_field($post_ID) {
global $wpdb;
if(!wp_is_post_revision($post_ID)) {
$content = get_the_content($post_ID);
add_post_meta($post_ID, 'desc', $content, true);
}
}