Hi,
Making a magazine-style WordPress theme, and I'm having issues with the <?php if(is_home())?> conditional tag.
I'm trying to show a content slider on my index.php page, and only that page. However, when I navigate to page 2, the slider is still there. Here is my code snippet:
<?php if (is_home()) { ?>
<div id="slider">
<ul>
<?php
$featuredPosts = new WP_Query();
$featuredPosts->query('category_name=featured&showposts=3');
while ($featuredPosts->have_posts()) : $featuredPosts->the_post();
$do_not_duplicate[] = get_the_ID();
$postcount++;
?>
<li><a class='bottom' href='<?php the_permalink() ?>'><h2><?php the_title(); ?></h2></a><img src='<?php echo get_post_meta($post->ID, 'featuredpic', $single = true); ?>' alt='<?php the_title(); ?>' />
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
<!--/slider-->
<?php } ?>
Any help would be awesome. I've been working on this all night! Thanks.