Change logo image on specific page

Best WordPress theme for festivals or other events with responsive, clean and unique design.
GK User
Fri Dec 13, 2013 2:19 pm
I need to change the logo image on a specific sub page. On the rest of the site the logo should be the standard one.

I am wondering how to go about this without hacking the parent theme. I have created a child theme, and I am considering implementing the gk_blog_logo() in my child themes functions.php and making a condition there that ensures the right image is shown.

But it doesn't seem that the Fest theme supports this? The function should be wrapped like this to support this functionality if I am not mistaken:

Code: Select all
if ( ! function_exists( 'theme_special_nav' ) ) {
    function theme_special_nav() {
        //  Do something.
    }
}


What would you suggest?
User avatar
Fresh Boarder

GK User
Fri Dec 13, 2013 8:35 pm
Hi,

Maybe try to use conditional tags in the layouts/header.php file:

Code: Select all
         <?php if(is_home()) : ?>
         <h1>
            <a href="<?php echo home_url(); ?>" class="<?php echo get_option($tpl->name . "_branding_logo_type", 'css'); ?>Logo"><?php gk_blog_logo(); ?></a>
         </h1>
         <?php else : ?>
         <img src="imageurl" />
         <?php endif; ?>

I used is_home() conditional, you can use is_page, post etc:
http://codex.wordpress.org/Conditional_Tags
so when is homepage, standard logo will be displayed, else you can display other image or whatever you want
User avatar
Moderator

GK User
Fri Dec 13, 2013 8:42 pm
Yeah, that sounds like a good way to go, should have thought of that!

Thanks, Piotr!
User avatar
Fresh Boarder


cron