add_action and save_post questions
-
Hi .
I need some help with add_action function .
I want, when a post will be submitted/updated to run a query .
I used add_action(‘save_post’,’my_function);
Everything is almost fine, the problem is that save_post parameter run this query 3-4 times . How can I limit this to run my query only once, when the post is saved or updated ?That was the first question .
Second is, it’s possible in my query to insert the ID of the post which will be created or updated ?
- The topic ‘add_action and save_post questions’ is closed to new replies.