Site logo

Archived topic

Add a specific link in a Logo (Page Header)

19 replies · Started by Mario on January 29, 2017

Viewing posts 16–20 of 20

Currently the code is doing what it's suppose to do - the logo on this page: http://vivaelsoftwarelibre.com/open-source-academy-osdemy/ links to this page: http://vivaelsoftwarelibre.com/net-developer-skills-enhancement-course/

Looks like this page: http://vivaelsoftwarelibre.com/net-developer-skills-enhancement-course/ is your blog page so try this instead:

add_filter( 'generate_logo_href','tu_add_custom_logo_href' );
function tu_add_custom_logo_href( $url )
{
    if ( is_home() ) {    
        return 'http://vivaelsoftwarelibre.com/osdemy-open-source-academy/';
    }
    return $url;
}

Let me know.

It is on the contrary indeed.

The logo on this page: http://vivaelsoftwarelibre.com/net-developer-skills-enhancement-course/ must link to this page: http://vivaelsoftwarelibre.com/open-source-academy-osdemy/

I used this code with no success:

add_filter( 'generate_logo_href','tu_add_custom_logo_href' );
function tu_add_custom_logo_href( $url )
{
    if ( is_page( 'net-developer-skills-enhancement-course' ) ) {    
        return 'http://vivaelsoftwarelibre.com/open-source-academy-osdemy/';
    }
    return $url;
}

I updated and saved the new snippet but it still does not work properly.

Any chance you can post the exact code you have added to your site just so I can take a look at it all in one place?

This archived topic is closed to new replies.