Reputation: 443
I'm building a child theme of the storefront WooCommerce theme. How do I edit the shop page, I can't seem to find a php template for it. Which files should I look into?
Upvotes: 2
Views: 4513
Reputation: 766
Storefront does not have it's own file rendering the shop page, it is using hooks to modify the content of the woocommerce/templates/archive-product.php
file inside the plugin directory.
Upvotes: 0
Reputation: 3562
You will not find the template files inside StoreFront Theme as they are altering the shop pages using hooks and you can find those hooks inside
inc>woocommerce>storefront-woocommerce-template-hooks.php
so if you want to target specific area you need to remove that action and added again with your custom output
for Example Let's Say you want to remove the StoreFront Pagination you can do it as following from your child theme:
add_action('woocommerce_before_main_content', 'remove_shop_hooks');
function remove_shop_hooks()
{
remove_action('woocommerce_before_shop_loop', 'storefront_woocommerce_pagination', 30);
}
and then you can add your custmized function normally Example:
add_action('woocommerce_before_shop_loop', 'testfunc', 10);
function testfunc()
{
echo 'test';
}
Upvotes: 3