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

Kabolobari Benakole
PLUS
Kabolobari Benakole
Courses Plus Student 14,278 Points

How to Create and Assign a Custom Page Template for the Store Page in WooCommerce

Hi, I'm looking to structure and style the store page in my WooCommerce custom theme differently. I see the store page defaults to the archive-product template, which other archives, such as categories and tags, also use.

I, however, want a different structure and look for the main store page, the categories pages, and the tags pages.

I did create a custom template, like you'll normally do in WordPress. And at the page creation area, I assigned this template to the store page. But then it still defaults to this archive-product template.

How do I make a custom template for each these scenarios and have my store, categories, and tags display in there own unique ways?

Thanks for your help.

PS: Zac Gordon, the WordPress/WooCommerce instructor didn't touch this at all, and I feel that's a serious oversight. The WordPress/WooCommerce course was supposed to be technical enough so that grounds like these should be covered. At this time, it feels like just customization. I want more custom work how-tos.

Ken Stone
Ken Stone
29,703 Points

Check out this course https://teamtreehouse.com/library/the-wordpress-template-hierarchy The WordPress Template Hierarchy and https://developer.wordpress.org/files/2014/10/template-hierarchy.png

The template hierarchy is what determines what template is used for each page.

Kabolobari Benakole
Kabolobari Benakole
Courses Plus Student 14,278 Points

Ken, I get your point, and I do know about the template hierarchy thing with WP. But, that's not the case here. Except I'm not sure how to make the main shop page override the archive-product.php template with a custom one. That's what I want.

Could you re-examine the case, if you have a better idea? Thanks.