add_action('publish_post') only works with deactivation of Meta Box plugin
-
My code in functions.php is
add_action('publish_page', 'add_custom_field_automatically'); add_action('publish_post', 'add_custom_field_automatically'); function add_custom_field_automatically($post_ID) { global $wpdb; if(!wp_is_post_revision($post_ID)) { add_post_meta($post_ID, 'status', 'notanswered', true); } }
It only works if I deactivated Meta Box plugin
I wonder why? Thanks in advance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add_action('publish_post') only works with deactivation of Meta Box plugin’ is closed to new replies.