Home Forums WoodMart support forum changing function in the theme

changing function in the theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112386

    razztech
    Participant

    hi

    i need to change somethings in this function
    /**
    * ————————————————————————————————
    * Custom function for product title
    * ————————————————————————————————
    */

    if( ! function_exists( ‘woocommerce_template_loop_product_title’ ) ) {
    function woocommerce_template_loop_product_title() {
    echo ‘<h3 class=”product-title”>‘ . get_the_title() . ‘</h3>’;
    }
    }

    on line 13 in /wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php

    how can i do that in child theme ?

    #112416

    Artem Temos
    Keymaster

    Hi,

    Just copy the whole function to the child theme functions.php file and do your changes.

    Kind Regards

    #112446

    razztech
    Participant

    it is not working i copied to the child theme this

    function woocommerce_template_loop_product_title() {
    echo ‘<h3 class=”product-title”>‘ . get_the_title() . ‘</h3>’;
    }

    is it enough ?

    #112466

    Artem Temos
    Keymaster

    Yes, it is enough for this customization.

Viewing 4 posts - 1 through 4 (of 4 total)