Linked Questions
14 questions linked to/from Execute function when post is published
1
vote
1
answer
3k
views
Notification to Admin or Author upon new post [duplicate]
I am using a custom function with 'publish_post' hook for a notification to the author when the post has been published but the issue I am facing right now is that the notification is being sent out ...
0
votes
1
answer
4k
views
How to run a function when publish posts? [duplicate]
I have written a PHP function in a php page. This function is not written in function.php. I have written that function in anyname.php file which is located in root directory.
I need to call that ...
1
vote
3
answers
2k
views
how to execute some code after a post is published in Wordpress [duplicate]
I have written a simple code to do something after a post is updated or published (its related to the varnish purge). I put my code inside post.php file. Everything was just fine before the latest ...
-1
votes
1
answer
1k
views
Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]
I have the following function that emails authors of a custom post type when the post is published which is great, but I would like it so that it does not email them on any future edits after that to ...
-2
votes
1
answer
290
views
Do anything on post_status change [duplicate]
What would be the nicest way to execute any code on post_status change. In our case we need execute a function the moment the post_status changes from draft to publish. As far as I can find there is ...
14
votes
5
answers
17k
views
How do I make a draft post accessible to everyone?
I have several unpublished posts in my Wordpress website and I am trying to make it accessible for normal users (who are not logged in) using the normal post slugs (site.com/post-here). I understand ...
2
votes
1
answer
21k
views
How to auto send email when publishing a custom post type?
I'd like to have an email automatically sent out to my website's subscribers when I publish a post for a specific custom post type. I've found a few plugins that will do this but only for regular ...
3
votes
3
answers
7k
views
How to access the post meta of a post that has just been published?
I am using the hook publish_post to run my code where I need the post meta of the just published post. But the post meta value I am looking for is somehow not available at this point of execution. On ...
3
votes
1
answer
6k
views
How to change post status in hook?
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 ...
0
votes
1
answer
1k
views
Send email when publish new post in certain categories
I'm looking for php code that will allow me to do the following: when new post publish in categories which ids are 12 and 34, email will send to all users.
2
votes
2
answers
264
views
Is there an action that is called when a post is restored from the trash?
I'm looking at the wordpress list of actions and trying to find an action that is called when a post is restored from the trash but cannot find one. Does anyone know if it exists?
0
votes
0
answers
294
views
WP-Automatic to run publish hooks
Maybe there is someone who could help me with this plugin I use. I need it to run publish hooks, so plugin WP to buffer would work.
So now WP-Automatic, publishes content, but WP to Buffer doesn't ...
-1
votes
1
answer
134
views
Can One Taxonomies Terms be Ordered by A Seperate Taxonomy?
I need some advice. I have a post type called "Movies" for example.
Inside Movies, I have two taxonomies: Genres and Ratings
Under Ratings my terms are 5 star, 4 star, 3 star, etc.
Under Genres ...
0
votes
1
answer
144
views
How to Test a Blog Post for Update vs. Publish Status -- Unique
I want to perform an action when a blog post gets published for the first time only. I do not want to take action on any subsequent update.
I wrote a plug-in to do this. However, it runs the function ...