My blog have 2 categories: Photos and Texts.

I would like do customize the category template so that when it renders Photos post's, I want to show a thumbnail gallery and when it renders Texts post's, I want show only the excerpt.

There is an way to do this without hardcoding on category.php? Or, at least, how is the best way to do this?

Thank you!


create category templates; i.e. category-photos.php and category-texts.php; starting with a copy of the code from category.php. you will still need to hard-code the changes in each template.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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