Home › Forums › Back End › Different Logo for each wordpress page › Reply To: Different Logo for each wordpress page
September 3, 2013 at 3:46 am
#148875
kaffekop
Participant
Perhaps something like this: http://www.tcbarrett.com/2011/09/wordpress-the_slug-get-post-slug-function/
Then you just have to add some css that matches your different pages.
#logo img{ background: url('/path/to/logo.png'); width: 100px; height: 50px; }
#logo img.about-us{ background: url('/path/to/logo-about-us.png'); }
#logo img.services{ background: url('/path/to/logo-services.png'); }
And then change your logo-container to:
<div><a href="/verve"><img src="/path/to/logo.png" class="<?php the_slug(); ?>" alt="Photo Lab" /></a></div>
Add Current slug: <?php the_slug(); ?>
somewhere to see what the slug is to the current page.
The above is untested as i dont really use wp anymore, but i think it should work :)