Home › Forums › Add-ons › Options Page › When using 'save_post' action, how do you identify which options page? › Reply To: When using 'save_post' action, how do you identify which options page?
I’m also wondering what to use in place of $post_id
when using save_post
with an options page.
I found the following on a question related to acf_form
and options
. Not sure if it applies, but I’m going to try it:
Just set the post_id param to ‘options’.
I found it on this post: Using acf_form with options plugin.
My understanding is that all options pages use the options
identifier, so I don’t know how you would distinguish between multiple options pages. Perhaps you could test for a unique field for each options page to determine which is which.
I will test using options
in place of $post_id
and let you know what I find.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.