add action only on post publish – not update
I have action which adds meta field with value on post publish. Problem is that when I update post meta field is reset to default value.
I have action which adds meta field with value on post publish. Problem is that when I update post meta field is reset to default value.
I have similar problem as described in How to trap “Publish” button to check for meta box validation?
Answer there is to hook into save_post and change post type. How can I do it?
I try to use wp_transition_post_status but it doesn’t work for me…
This is all about featuring content in WP.
I need to make WordPress call a specific REST endpoint when a new post is published, passing the most important post data via JSON.
I’m trying to add a “Publish” link by the quick actions:
I manage a blog which consists of about 25 writers. Sometimes a few of them are in the process of writing a new post at once, and they end up publishing them too close to each other.
When I write a post and schedule it for later publishing, WordPress will allow me to preview the post as if it was already published but I need to be logged in as administrator (or anyone who is authorized to preview the post).