• Hello. I would like to make changes to archive-product.php part where the product loop is called:

    woocommerce_product_loop_start();
    
    		if ( wc_get_loop_prop( 'total' ) ) {
    			while ( have_posts() ) {
    				the_post();
    
    				/**
    				 * Hook: woocommerce_shop_loop.
    				 *
    				 * @hooked WC_Structured_Data::generate_product_data() - 10
    				 */
    				do_action( 'woocommerce_shop_loop' );
    
    				wc_get_template_part( 'content', 'product' );
    			}
    		}
    
    		woocommerce_product_loop_end();

    But in Genesis Connect for WooCommerce, it was in template-loader.php and called in archive-product.php using genesiswooc_content_product() function. Is there a way to override template-loader.php on child theme?

Viewing 1 replies (of 1 total)
  • Hi, icangeek.

    Did you solve this?

    I have the same problem and I have solved it copying the archive-product.php to my theme folder and then, change the name of the function “genesis_content_product()” to my own function name.

    Then, I copied the code of the funcion genesis_content_product() of the template-loader.php file, chagen the name and changing all the necessary code to make my custom changes.

    I hope that this help you.

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘How to override template-loader.php?’ is closed to new replies.