Forums

List post titles only in category view (6 posts)

  1. WoodiE
    Member
    Posted 3 years ago #

    Right now when viewing a Category all the posts for that category is displayed either in it's entirety or until the More tag.

    How can I change this so that when viewing a category only the posts titles are listed, no other post text. Any help on this would be greatly appreciated.

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    With the help of the Template Hierarchy article, determine what Template is displaying your Category archives (views).

    Then in that Template, change the use of the template tag, the_content(xxxxx), to the_excerpt().

  3. WoodiE
    Member
    Posted 3 years ago #

    I'm sure that might make sense to someone out there but not me, anyone else with any suggestions?

  4. MichaelH
    Volunteer
    Posted 3 years ago #

    If you are using the WordPress Default theme you would edit the file wp-content/themes/default/archive.php and

    change:
    <?php the_content() ?>

    to
    <?php the_excerpt() ?>

  5. renato_s
    Member
    Posted 3 years ago #

    I think he wants no text at all, just the post titles.

    In that case, just delete the template tag <?php the_content() ?> from your theme's category.php file or, if it doesn't exist, from the archive.php file.

  6. MichaelH
    Volunteer
    Posted 3 years ago #

    Thank you for correcting me renato_s.

Topic Closed

This topic has been closed to new replies.

About this Topic