Home › Forums › Add-ons › Options Page › Add custom message to option page › Reply To: Add custom message to option page
Hi John!
Thank you for your reply, it is exactly what i was looking for. I’ve got a small question. If i use it on top level page, it works perfectly, but i can’t make it works with sub option page.
My code is:
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Impostazioni',
'menu_title' => 'Impostazioni',
'menu_slug' => 'theme-trends-settings',
'capability' => 'edit_posts',
'redirect' => false
));
acf_add_options_sub_page(array(
'page_title' => 'Forms',
'menu_title' => 'Forms',
'parent_slug' => 'theme-trends-settings',
));
acf_add_options_sub_page(array(
'page_title' => 'Gestione livelli abbonamenti',
'menu_title' => 'Gestione livelli abbonamenti',
'parent_slug' => 'theme-trends-settings',
'menu_slug' => 'gestione-livelli-abbonamento'
));
add_action('theme-trends-settings_page_gestione-livelli-abbonamento', 'before_acf_options_page', 1);
function before_acf_options_page() {}
add_action('theme-trends-settings_page_gestione-livelli-abbonamento', 'after_acf_options_page', 20);
function after_acf_options_page() {}
What i’m doing wrong?
Thank you
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!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 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.