Site logo

Archived topic

logo for category linked to blog page

3 replies · Started by Feber on April 29, 2022

Viewing posts 1–4 of 4

Hi there,

I have a different logo for my blog page as well as all categories page.
It has to be linked to my blog page. But it linked to my homepage in all categories page and tag's page.
https://prnt.sc/5cxHpp_gTqxm

I already put the snippet code :

add_filter( 'generate_logo_href', function($url) {
if ( is_single() || is_home() ) {
$url = "my-blog-url";
}
return $url;
}, 99, 1 );

I want to make my blog's logo only linked to my blog/article page.

What should I do ?

Hi there,

this line in your snippet:

if ( is_single() || is_home() ) {

Change it to:

if ( is_single() || is_home() || is_archive() ) {

Thank you very much

You're welcome

This archived topic is closed to new replies.