WordPress.org

Ready to get started?Download WordPress

Forums

the_excerpt(); and Category Links (4 posts)

  1. danmerk
    Member
    Posted 8 years ago #

    Can someone help me with thsi small problem. I have a navigation where I list out each category (static text) as a section to my site. I post daily to different categories, and I wanted an excerpt of that post to display under the static text. Example on page:

    Photography
    Excerpt text from single lastest category2 post

    Homebrewing
    Excerpt text from single lastest category3 post

    Artwork
    Excerpt text from single lastest category4 post

    Note that category 1 is the main blog entries. I only post to these other categories every few days. Thanks.

    BTW: I have this on one link now:

    <p class="navigation">Photography</p>
    <p class=""><?php the_excerpt(); ?></p>

    Can I do this?

    <?php the_excerpt('category=2'); ?>

  2. moshu
    Member
    Posted 8 years ago #

    Probably you can't. This template tag doesn't have parameters:
    Template_Tags/the_excerpt#Parameters

  3. danmerk
    Member
    Posted 8 years ago #

    So then how can I display some text from the most recent post of each category?

  4. moshu
    Member
    Posted 8 years ago #

    I'd try a search for "recent posts by category".

Topic Closed

This topic has been closed to new replies.

About this Topic