Home › Forums › Add-ons › Options Page › Option Pages does not work when submenu pages are there › Reply To: Option Pages does not work when submenu pages are there
Only thing I did is:
– acf_add_options_page with “redirect: false”
– and then “add_submenu_page()” which negates the redirect and makes it “true” basically
Why? Because I have ACF Option Page ad main where I have settings. It’s for my plugin. After that I need custom pages (mosty currently used to hide CPT my plugin creates).
So when I click on the “first” item I see Option Page but there is submenu with more subpages I need.
Correct me if I am wrong, but why should I use “acf_add_options_sub_page” to link to CPT or show custom content (not related to ACF)? This function does not support that, so I use default WordPress way
PS: I managed to have it working (add acf subpage and the main option page is redirecting to it).
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.