Site logo

Archived topic

Change logo in some particular pages

1 reply · Started by Mario on September 19, 2016

Viewing posts 1–2 of 2

Hi Tom,

I have recently acquired your plug-ins. They are really nice.

My webpage is about free software, where I write about tutorials, tricks and so on (www.vivaelsoftwarelibre.com). As you can see in the URL, the logo is below the menu, in orange, with a V and a penguin.

However, I have recently added an e-commerce in the same page (http://vivaelsoftwarelibre.com/linuxtore-tienda-comprar-productos-linux/), and I want to change the logo by the linuXtore logo that appears in the page. And I would like to change the logo in all the subpages automatically.

How can I do it?

Hi there,

Our Page Header add-on has a tab which allows you to change the logo on specific pages.

You can also use a PHP function with WordPress conditionals to change the logo on specific pages dynamically: https://codex.wordpress.org/Conditional_Tags

Your function would look something like this:

add_filter( 'generate_logo', 'tu_change_logo' );
function tu_change_logo( $logo )
{
    if ( is_page( 10 ) ) :
        return 'URL TO CUSTOM LOGO FOR PAGE 10';
    endif; 

    // Return the default logo otherwise
    return $logo;
}
This archived topic is closed to new replies.