Support

Account

Home Forums Add-ons Options Page The desired dashicon for the Options Page isn't rendering

Solved

The desired dashicon for the Options Page isn't rendering

  • Here’s my code;

    add_action('acf/init', 'va_acf_op_init');
    function va_acf_op_init() {
    
        // Check function exists.
        if( function_exists('acf_add_options_sub_page') ) {
    
            // Add parent.
            $parent = acf_add_options_page(array(
                'page_title'  => __('Website Settings'),
                'menu_title'  => __('Website Settings'),
                'icon-url' => 'dashicons-admin-tools',
                'redirect'    => true,
            ));
    
            // Add sub page.
            $child = acf_add_options_sub_page(array(
                'page_title'  => __('Website Links'),
                'menu_title'  => __('Website Links'),
                'parent_slug' => $parent['menu_slug'],
            ));
    
            // Add sub page.
            $child = acf_add_options_sub_page(array(
                'page_title'  => __('Site Callout Row'),
                'menu_title'  => __('Site Callout Row'),
                'parent_slug' => $parent['menu_slug'],
            ));
        }
    }
  • 'icon-url' should be 'icon_url'

  • Thank you. Can you tell me why it’s necessary to use _ instead of – here or point me in the right direction to learn more?

Viewing 4 posts - 1 through 4 (of 4 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.