preeminent Posted December 19, 2010 Share Posted December 19, 2010 Hey all! I have a question and I'm thinking it's probably an easy fix. I have messed around with conditional and else/if statements for this, but cannot wrap my head around how to fix this problem. I have a wordpress theme I'm working on, and on ONE page of it, I need a different logo in the header than the rest of the site. I have it setup so that, that logo appears on the "STORE" template page. That part is working fine. But my problem is that the default "Bloglogo" logo is also showing on this page along side of the "preemplateslogo" store logo. I only want the "preemplateslogo.png" to show on this store page, not the "bloglogo.png" which is displayed on every other page of the site. Here is what I'm working with: <?php if (is_page_template('store.php')) { ?> <a href="<?php bloginfo('url') ?>"><img src="<?php bloginfo('template_url'); ?>/assets/img/preemplateslogo.png" alt="Preemplates" /></a> <?php } ?> <?php $customField1 = get_option("theme_logo"); if (isset($customField1[0])) { ?> <a href="<?php bloginfo('url') ?>"><img src="<?php echo get_option('theme_logo',true); ?>" alt="Logo" /></a> <?php } else { ?> <a href="<?php bloginfo('url') ?>"><img src="<?php bloginfo('template_url'); ?>/assets/img/bloglogo.png" alt="Preeminent Productions Blog" /></a> <?php } ?> </div> The first statement is pulling in that store logo just fine. I just need to edit the second part to NOT SHOW the "bloglogo.png" on this particular page. I hope this makes sense and thank you! Quote Link to comment Share on other sites More sharing options...
preeminent Posted December 20, 2010 Author Share Posted December 20, 2010 crap! Sorry, I didn't realize this went into Applications category. Quote Link to comment Share on other sites More sharing options...
preeminent Posted December 24, 2010 Author Share Posted December 24, 2010 anyone? I really think this is probably something simple. I don't know if I explained it well enough though? Quote Link to comment Share on other sites More sharing options...
JKG Posted January 16, 2011 Share Posted January 16, 2011 use the if else statement to match to the page id, not the url. <?php if ( $page_id ) {?><img src="logo.png" title="Logo"> <? } else {} ?>[/php or if it is the homepage, try this: [code=php:0]<?php if ( is_front_page() ) {?><img src="logo.png" title="Logo"> <? } else {} ?> then use else to display the image for every other page... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.