Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have several category pages (e.g. example.com/?cat=3) that display only the post titles. I would like to make them display the post as well. What is the easiest way to do this?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

Category pages or archives? If you're a little more specific you will probably get multiple ideas, but in general, if you've got a loop you can use one of the two following functions:

  • <?php the_excerpt(); ?> will show the custom or default excerpt for the post
  • <?php the_content('Read More &raquo;'); ?> will show the full post with a "Read More" link employed if you've used <!-- more--> in your post to show only part of the post on aggregate templates

If you are looking for simple functions for your templates to display content, you should probably read up on the WordPress codex.

share|improve this answer
    
I would like to display category pages. To add the_excerpt do I just make a filter for the loop? –  Awesome Name Aug 3 '11 at 1:25
    
I'm not sure what you mean by category pages. Archives are generally date, category or tag based, so a category 'page' would be an archive in WP parlance. Or, do you mean something else? Normally, unless you only wanted to show title and meta data, an archive loop will include an excerpt or the post content. You wouldn't use a filter, you'd just place the function in the loop where you want the excerpt to show and surround it by the markup that you want to use to position/style it. –  jameswanless Aug 3 '11 at 3:15
    
Thanks for your help. –  Awesome Name Aug 4 '11 at 18:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.