Support » Fixing WordPress » Exclude a category in home page latest posts

  • Resolved johndove523

    (@johndove523)


    Hi, see url http://testing.backstageweb.net/

    On the home page, the text under the photo is a post with a category of “home page” (ID=4). In the “recent blog posts” box on the left, I don’t want the “home page” category post to show up in that list. How do I need to modify this code:

    <ul>
    	<?php query_posts(array('showposts' => 2, 'order' => 'dec')); while (have_posts()) { the_post(); ?>
    	<li class="date"><?php the_time('F j, Y'); ?></li>
    	<li class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    	<?php } ?>
    </ul>

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude a category in home page latest posts’ is closed to new replies.