Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

i need help.i have grifus 3.0 theme and want to customize it. I want to add a feature image to a category zac??????

i need help.i have grifus 3.0 theme and want to customize it. I want to add a feature image to a category and some details.text. how can i do. If Zac will give me some time it'll be done.any reference will be great...I tried google by the way.

9 Answers

Stanley Thijssen
Stanley Thijssen
22,831 Points

Can't you just change the template file for the category you want to have a featured image on?

for example the category is products, you can add a file named category-products.php. In this file you add your html markup and add the the_post_thumbnail() function to display the featured image.

I have too many categories ,it's a movie theme so, you know.

Stanley Thijssen
Stanley Thijssen
22,831 Points

then its not an idea to change your category.php file?

as you mentioned if i have a category products ,then i should make a file category-products.php ...i have 100+ categories ,so it's gonna make 100+ .php files????

grifus is a movie theme.

Stanley Thijssen
Stanley Thijssen
22,831 Points

I mean if you code the category.php file with featured image and the text you want to output that would give all of those 100+ categories everything you want.

i would love try How?

Stanley Thijssen
Stanley Thijssen
22,831 Points

create a category.php file and add all the wordpress functionality you want inside that file for example the featured image. When you added a featured image to this file, all of your categories will have a featured image on their page.

i already have category.php in my theme need a which will work ,You think the_post_thumbnail() will work in grifus.???

Stanley Thijssen
Stanley Thijssen
22,831 Points

You can just adjust the category.php file of the template? I suggest creating a child theme though because if you update your theme you will lose your code.

I would say just try it in the main theme first and see whether it works like you want or not and if it does start with the child theme