Woocommerce template overrides
-
Hi all,
Was just wondering what the best method of customizing woocommerce templates.
For example if I wanted to remove the breadcrumbs off each page what is a better method of removing them. I can either use functions to achieve the customisation I wish or edit the template files. I have to edit the class names within the templates to use my own styles but removing stuff like the product page sorting, What do you do Add a hook or remove the action from the template file.
Example 1. Add a hook
remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20, 0); //Remove Woocommerce BreadcrumbsExample 2. Remove the action from the template file
<?php /** * woocommerce_before_main_content hook * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) * @hooked woocommerce_breadcrumb - 20 */ do_action( 'woocommerce_before_main_content' ); ?>
The topic ‘Woocommerce template overrides’ is closed to new replies.