Search code examples
phpwordpresswoocommercewordpress-themingstorefront

How do I customise the product search results page on a woocommerce website?


I want to edit the html of the product results posts in my woocommerce storefront child theme.

Under search.php it says:

get_template_part( 'loop' );

Then under loop.php it says:

get_template_part( 'content', get_post_format() );

Which then takes me to content.php which contains:

do_action( 'storefront_loop_post' );

So do I need to edit the functions inside that action? If so how?

Quite new to using child themes.


Solution

  • Inside content.php, I commented out the storefront_loop_post hook and created my own action which I then referenced.

    Works a treat