Support » Theme: Twenty Twenty-One » Remove Social Icons in Menus

  • Resolved thunderfrog

    (@thunderfrog)


    Is there a way to remove a filter globally for social icons in filters. I am using a custom icon set and I can not get the theme to stop over riding it. I do like having them in a widget block generally (though not always), but would love some way to turn them off.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter thunderfrog

    (@thunderfrog)

    @domainsupport fantastic!

    Thread Starter thunderfrog

    (@thunderfrog)

    An update that just adding that to functions.php didn’t seem to do the trick unfortunately.

    That’s probably because your call to remove_filter() in functions.php is being fired before the theme’s add_filter().

    To resolve that, it needs to be added in a hook, something like …

    function twenty_twenty_one_remove_social_icons() {
    remove_filter('walker_nav_menu_start_el', 'twenty_twenty_one_nav_menu_social_icons');
    }
    add_action('after_setup_theme', 'twenty_twenty_one_remove_social_icons');

    … should do the trick by calling remove_filter() after the theme has loaded.

    Oliver

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Social Icons in Menus’ is closed to new replies.