WordPress.org

Ready to get started?Download WordPress

Forums

Catagory list (5 posts)

  1. merkio
    Member
    Posted 7 years ago #

    Is there anyway to display a list of posts per catagory when clicking on a catagory in the side bar. Similar to how MT does it.

    Instad of displaying every full post within that catagory it displays a list of posts sorted by date.

    I've trying playing around with the the_excerpt but it's not quite what I need.

    here is a screen shot of what MT does.
    http://www.wmcrn.org.uk/posts.jpg

    Any help greatly appriciated.

  2. theiconoclast31
    Member
    Posted 7 years ago #

    So you're getting the excerpt, but you want only the link?

    If so, remove the excerpt and instead, type the following:

    <?php the_time('F j, Y'); ?> :: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

    You may want to wrap them in a set of <li></li> tags and make it an unordered list.

  3. merkio
    Member
    Posted 7 years ago #

    Well, what I'd really like to do is have the main index page show the full posts but when a catagory is selected just be presented with a list of links to relevent posts.

  4. theiconoclast31
    Member
    Posted 7 years ago #

    Go to http://pastebin.ca/raw/258580

    Save the code as category.php and upload it to the same folder that has index.php.

    If it doesn't work, delete the file. This works assuming that you're using the default template. If you're not using the default template, the only thing I changed was the loop, so it shouldn't be hard to hack .

  5. merkio
    Member
    Posted 7 years ago #

    thanks, I'll give it a whirl.

Topic Closed

This topic has been closed to new replies.

About this Topic