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 trialShehzad Khan
Courses Plus Student 664 Pointsi 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
22,831 PointsCan'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.
Shehzad Khan
Courses Plus Student 664 PointsI have too many categories ,it's a movie theme so, you know.
Stanley Thijssen
22,831 Pointsthen its not an idea to change your category.php file?
Shehzad Khan
Courses Plus Student 664 Pointsas 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
22,831 PointsI 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.
Shehzad Khan
Courses Plus Student 664 Pointsi would love try How?
Stanley Thijssen
22,831 Pointscreate 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.
Shehzad Khan
Courses Plus Student 664 Pointsi already have category.php in my theme need a which will work ,You think the_post_thumbnail() will work in grifus.???
Stanley Thijssen
22,831 PointsYou 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