Home › Forums › Add-ons › Options Page › acf/save_post for specific options page › Reply To: acf/save_post for specific options page
Of course. I have five different option pages.
Create a function for each option page with the the condition above and replace the string “acf-options-adverts” with the slug of the attached option page (you may have a look in the url-bar of each page).
In your case for example I could imagine the code to look like this:
if (strpos($screen->id, "acf-options-product") == true) {β¦
if (strpos($screen->id, "acf-options-service") == true) {β¦
if (strpos($screen->id, "acf-options-theme-option") == true) {β¦
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βre excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
π #ComposerPHP fans rejoice!
β¨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.