Forums

Posting excerpts of a specific category's posts on a page (3 posts)

  1. tactics
    Member
    Posted 5 years ago #

    OK, I did a lot of searching around and figured out how to use "query_posts", but it's not doing quite what I want.

    Here's the scoop:

    I've got a category called "news" here

    I need a page that looks exactly like that (title, excerpt, more link). So I created a new template for the page and added the following:

    <?php query_posts('showposts=10&cat=2'); if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_excerpt(); ?>
    <?php endwhile; else : endif; ?>

    But the result is this page. It lacks the posts' titles, more links, and isn't displaying what I have set before the <!--more--> tag.

    Any ideas on how to replicate that category as a page?

  2. Chris_K
    Member
    Posted 5 years ago #

    Have you read up on Category_Templates?

  3. tactics
    Member
    Posted 5 years ago #

    The category looks exactly how I want it. So I don't need to modify that.

    What I need is for the news page to be an exact replicate of the news category. The reason for this is that I need the news items to appear on a sub-page of my "news and events" page, so the link to it will be output in my sidebar's page navigation. Does that make sense?

Topic Closed

This topic has been closed to new replies.

About this Topic