skip to Main Content
Filter Custom Logo Link Class – WordPress

Filter custom logo link class – WordPress

WordPress is the most popular CMS framework. When we create the WordPress theme using Bootstrap Framework Then the “navbar-brand” class is required for display logo on the navigation menu. Let’s see How WordPress filter custom logo link class

Many times we need to add a new class or change the “custom-logo-class” with other class. Let’s how we can use the filter for changing the custom logo class. Add the below code to your “functions.php” file.

WordPress filter custom logo link class

function thecodingstuff_custom_logo_class( $html ) {
    $html = str_replace('custom-logo-link', 'navbar-brand', $html );
    return $html;
add_filter('get_custom_logo', 'thecodingstuff_custom_logo_class', 10);

So, It’s too easy to change default WordPress custom logo class.


I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top