Support

Account

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