WordPress.org

Support

Support » How-To and Troubleshooting » How to display a category in a page?

How to display a category in a page?

  • I want to display a Category in a “Page” because I have a Contests page and want to just display all the Contest entries in it. I created a Contest Page and put what I thought was the right code in there:

    <?php query_posts('cat=15&showposts=10'); ?>
    
    <ul>
      <?php while (have_posts()) : the_post(); ?>
      <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
      <?php endwhile;?>
    </ul>

    But it’s not displaying anything. Am I right to create a new Page to display a category for a “Contest” page?

    thanks,
    shane

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to display a category in a page?’ is closed to new replies.