• Resolved aaron843

    (@aaron843)


    Hello. I just updated to WC 2.5

    My child theme makes modifications to
    /wp-content/plugins/woocommerce/templates/loop/title.php

    I put in something like this:

    <h3><?php the_title(); ?></h3>
    <?php the_subtitle( '<p class="product-subtitle">', '</p>' ); ?>

    I need to make a similar modification to the shop loop in 2.5 but there is no title.php that I can find (yet) in the shop loop that is making the <h3> tag.

    But the title.php file no longer exists it seems in WC 2.5… So, I’ve been searching for where this code now lives. Does anyone know?

    https://www.ads-software.com/plugins/wp-subtitle/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aaron843

    (@aaron843)

    In case others are attempting the same modification, I copied the following code into my child theme’s function file, via the editor, and it worked.

    if (  ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
    	/**
    	 * Show the product title in the product loop. By default this is an H3.
    	 */
    	function woocommerce_template_loop_product_title() {
    		echo '<h3>' . get_the_title() . '</h3>';
    		echo the_subtitle( '<p class="product-subtitle">', '</p>' );
    	}
    }

    Hey aaron843,
    Thank you for this code. Exactly what I was looking for since my last update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘/woocommerce/templates/loop/title.php where did it go?’ is closed to new replies.