Site logo

Archived topic

Unique header for a specific part of site

32 replies · Started by Matthew on February 17, 2020

Viewing posts 31–33 of 33

Try this instead:

add_filter( 'generate_retina_logo', function( $logo ) {
    // Return our category logo URL
    if ( is_singular( 'pictures' ) ) {
        return 'https://www.imjexa.com/wp-content/uploads/2020/04/imjexa_logo_web_interplay@2x.jpg';
    }

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

Yes, both URLs should use https.

great that works.

Should I use that last code you put for my regular (non retina logo) too? What I have currently and which does work is:

add_filter( 'generate_logo','tu_category_logo' );
function tu_category_logo( $logo ) {
    
    // Return our category logo URL
    if ( is_singular( 'pictures' ) ) {
        return 'https://www.imjexa.com/wp-content/uploads/2020/04/imjexa_logo_web_interplay.jpg';
   }

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

Using generate_retina_logo instead of generate_logo.

thanks,

That's fine as is. The error came from having two functions with the same name :)

This archived topic is closed to new replies.