generate_logo

The generate_logo filter allows you to change your logo.

Default (URL): Your logo set in Customize > Site Identity.

Usage

Please refer to the Using Filters article to learn how to use this filter.

Examples

If you want to show a different logo inside categories, you could do this:

add_filter( 'generate_logo', function( $logo ) {
      // Return our category logo URL
    if ( is_category() ) {
        return 'URL TO YOUR CATEGORY LOGO';
    }

    // Otherwise, return our default logo
    return $logo; 
 } );

If you want to show a different logo for different languages, you could do this:

add_filter( 'generate_logo', function( $logo ) {
    if ( ICL_LANGUAGE_CODE == 'en' ) {
        return 'URL TO ENGLISH LOGO';
    }

    return $logo;
} );