The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to display a category in a page? (2 posts)

  1. 3eamus
    Posted 8 years ago #

    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'); ?>
      <?php while (have_posts()) : the_post(); ?>
      <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
      <?php endwhile;?>

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


  2. moshu
    Posted 8 years ago #

    No, you are wrong.
    Use Category_Templates for displaying posts in a category.

Topic Closed

This topic has been closed to new replies.

About this Topic