I'm setting up my wordpress website on my server now and have the rotating images on the home page and it's beautiful, but now I want to have a conditional tag telling wordpress if it's not the home page use the featured images per each page.
This is the code I've placed onto my home page to display my plugin rotating banners from iThemes.com
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('banner-widget')) : else : ?>
<p><img class="banner" src="<?php bloginfo('template_directory') ?>/img/BANNER1-averylawoffice.jpg" alt="Banner 1"></p>
<?php endif; ?>
It works great! My widget is ready to go for this, images are all there and it works. Now I have this code I want to put into an if else statement so if the page ISN'T the home page, show the featured image.
I'm no programmer expert and have looked around a lot to get this code, however it doesn't work and I just see a blank spot on the home page and the images on the rest of the page as they should be.
<?php if (is_home()) {
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('banner-widget')) : else : ?>
<p><img class="banner" src="<?php bloginfo('template_directory') ?>/img/banner.jpg" alt="Banner 1"></p>
<?php endif; ?>
} else { ?>
<div id="banner"><?php the_post_thumbnail( 863, 328 );?></div>
<?php } ?>
What am I doing wrong is order to not get the desired effect I'm looking for? I know this is simple so I don't want to use a useless plugin to do this and slow down the site as it's going to be slow as is.
Any help or suggestions would be great!