Ignore certain posts in top story
-
Hi, I have a “top story” in my blog, and I want it to ignore posts from my video category. Here is the code I use:
<?php if (in_category('Video') && is_home() ) continue; ?> <?php $posts = get_posts('numberposts=1'); foreach($posts as $post) : setup_postdata($post); ?> <div class="post-date">Last Updated on <?php the_time('l, F j, Y : g:i a') ?> </div> <h2><a href="<?php the_permalink() ?>" title="Permanent link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_content(__('<p><img src="/img/readmore.gif"></p>'));?> </div> <?php endforeach; ?>
and yet, it doesnt ignore those posts. How can I get this to display properly?
- The topic ‘Ignore certain posts in top story’ is closed to new replies.