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 show excerpts of all posts at this site. Which works fine.

However, I would like show content for posts of a specific category, while keeping all others showing excerpts.

Is it possible, without a plugin? With a filter in functions.php, etc.?

Working with 3.1.4, twentyten.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can use the in_category function to test if the current post in the loop is in the specific category you want to display full content for.

For example

if ( in_category( 'my_category') ) :
    the_content();
else :
    the_excerpt();
endif;

For more information on the in_category function see the WordPress codex at: http://codex.wordpress.org/Function_Reference/in_category

share|improve this answer
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.