angelic_webmaster
asked on
Wordpress - how to make 2 different logos - one on some pages one on others
Here is the website. Trying to make two logos appear. One on a few pages, and another on other pages?
http://www.ronhenrey.com/welcome/
http://www.ronhenrey.com/welcome/
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Would this still work on my new template I am using.
www.ronhenrey.com
<?php
$logoImg = get_post_meta(get_the_ID(),'logo-image');
try
{
$logoImg = $logoImg[0];
}
catch (Exception $e)
{
$logoImg = "/wp-content/images/uploads/default-logo.png"; //place a default image here for pages that don't have it set
}
?>
<img src="<?php echo $logoImg;?>" alt="Logo"/>
www.ronhenrey.com
re: post 39299292
Yes that should still work.
If you have a custom field named "logo-image" on a page it should display that image. If you don't have that custom field on a page, it will display the default image.
Yes that should still work.
If you have a custom field named "logo-image" on a page it should display that image. If you don't have that custom field on a page, it will display the default image.
ASKER
Thank you all for helping me. The code was great - although I went a different route :)
ASKER
My father passed away this last week so I have not been able to respond.