I’m struggling to get the Options Menu settings to work for me.
I’m adding an Options Menu via acf_add_options_page()
in a plugin that I’m treating as a “parent” plugin that has some global settings and functionality for a multisite network of sites…
if (function_exists('acf_add_options_page')) {
acf_add_options_page(
array(
'page_title' => 'Geauga Connected Dashboard',
'menu_title' => 'Geauga Connected',
'menu_slug' => 'geauga-connected-dashboard',
'capability' => 'edit_posts',
'redirect' => false,
'position' => 2,
)
);
}
What I want to do is use acf_add_options_sub_page()
within other plugins to add submenus to the “parent” plugin’s Options Page…
if (function_exists('acf_add_options_sub_page')) {
acf_add_options_sub_page(
array(
'page_title' => 'Alert Bar Settings',
'menu_title' => 'Alert Bar',
'parent_slug' => 'geauga-connected-dashboard',
'capability' => 'manage_options',
'menu_slug' => 'alert-bar-settings',
'position' => 10,
)
);
}
No matter what I’ve tried, I cannot get the submenu to display at all. I’ve messed with the hook priority settings, ie. loading the “parent” plugin’s acf/init
hook before the other plugin’s acf/init
hook, but the submenu is not being added.