Home Forums Add-ons Options Page Get a list of defined Option Pages?


Get a list of defined Option Pages?

  • I am looking for a way to get a list of all the defined Option/Sub Option Pages.
    I only need to know the slugs of each page, but the object would be better.

    I did find that they are listed in $GLOBALS[‘acf_options_pages’].

    Just wondering if there is a better method. Also just adding it here for others.


  • acf_get_options_pages(), not sure what it returns, but pretty sure it just gets what defined in the global

    • tylerkd

    • December 6, 2018 at 9:48 am

    For anyone else arriving here later,
    If you check line 425 in options-page.php you’ll see it’s doing a bit more than that. It seems to be applying filters, checking for parent child redirects, returning false if there are no options pages, and finally returning all the pages.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

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.