0
votes
1answer
43 views

disable publish button until condition is not met

I currently wrote a plugins to customize my wordpress website. I surprisly find it easy to do many things with hook. Now I want to make author not be able to push publish button if no category is ...
0
votes
1answer
21 views

new_to_publish fires multiple times

i have been trying to use draft_to_publish & new_to_publish to create an update when ever a post of a specific type (cpt) is published... it works but published 600+ times instead of one time! ...
0
votes
2answers
89 views

How to show an error message after publishing a post?

I'm using the transition_post_status hook to perform some operations after publishing a post. In some conditions I would like to show an error message in a red box under "Edit Post" and above "Post ...
0
votes
1answer
46 views

Change event firing in wordpress

I have to run a function when a post is published. The function checks a custom meta value and works accordingly. I am using couple of hooks for this purpose: new_to_publish draft_to_publish ...
0
votes
1answer
60 views

an action hook when a post reaches a certain number of views

I am using WP Post Views plugin to display the post number of views. I use: <?php if(function_exists('the_views')) { the_views(); } ?> I am creating a badge system for my wordpress site. My ...
0
votes
3answers
89 views

How to hook into publish_posttype?

I'm trying to hook into WordPress publish. The code below is what I'm using, but it doesn't appear to be running. I have it in a plugin file that I deactivate/reactivate each time I make changes ...
1
vote
0answers
72 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
2
votes
1answer
375 views

In what sequence are the hooks fired when a post is “published”?

I would be grateful if someone could point out a link. I understand this may have a very lengthy answer but I searched and couldn't find any resource. Alternatively, it would also be nice if someone ...
2
votes
1answer
1k views

Check before publishing, if already exist post with current custom field value

I have a custom post type with only 3 custom fields in it. $post_types = get_post_meta($post->ID,'post_types',true); $post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true); ...
0
votes
1answer
2k views

add_action hook for publish_post not working

I can't get my function to trigger on post update or save. I've found a couple of other forum posts around with the same problem, but never an answer :( My code is as simple as: function ...
0
votes
1answer
335 views

run script on publish

I am trying to run a script when a user publishes / updates a post. I am using the filter: wp_insert_post_data The problem I am having is the script is a php file outside of WordPress but on the ...