dobst
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Mh, I tried to raise the priority (lower the value) without an effect.
Ok, thank you for the hint. There is a bunch of transiton_post_status hooks. But non works 🙁 Hope, the function save_details() is correct:
function save_details() { global $post; update_post_meta($post->ID, "begin_date", $_POST["begin_date"]); update_post_meta($post->ID, "end_date", $_POST["end_date"]); add_post_meta($post->ID, 'begin_date', $_POST["begin_date"], false); add_post_meta($post->ID, 'end_date', $_POST["end_date"], false); } add_action('new_to_publish', 'save_details'); add_action('pending_to_publish', 'save_details'); add_action('draft_to_publish', 'save_details'); add_action('auto-draft_to_publish', 'save_details'); add_action('future_to_publish', 'save_details'); add_action('private_to_publish', 'save_details'); add_action('trash_to_publish', 'save_details');Hello Matty, thank you for your reply. How can I achieve this? Custom fields are “begin_date” and “end_date”. I tried to force a “save” before publishing with the following, various actions in my functions.php:
function save_details() { global $post; update_post_meta($post->ID, "begin_date", $_POST["begin_date"]); update_post_meta($post->ID, "end_date", $_POST["end_date"]); add_post_meta($post->ID, 'begin_date', $_POST["begin_date"], false); add_post_meta($post->ID, 'end_date', $_POST["end_date"], false); } add_action('pre_post_update', 'save_details'); add_action('before_publish_post', 'save_details');But it doesn’t work.
Forum: Plugins
In reply to: [Plugin: Subscribe2] Advanced Custom Fields in post emailsHello,
just a litte *push* on this unsolved problem…
How can I contact the forum member ‘EagleRock’?
Viewing 4 replies - 1 through 4 (of 4 total)