• Resolved almagarett

    (@almagarett)


    Hi i am using woostify theme. On homepage and categories page. I want to change product titles from h2 to h3. Any help is appreciated. No code is working currently.
    Site: https://neoprenebags.net/

    Thanks!

    • This topic was modified 2 years, 2 months ago by almagarett.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Dylan Ngo – Woostify

    (@duongancol)

    Hi,
    You can use the code below

    add_action( 'init', 'remove_actions_parent_theme', 99 );
    function remove_actions_parent_theme() {
        remove_action( 'woocommerce_shop_loop_item_title', 'woostify_add_template_loop_product_title', 10 );
    }
    
    add_action( 'woocommerce_shop_loop_item_title', 'woostify_custom_add_template_loop_product_title', 10 );
    if ( ! function_exists( 'woostify_custom_add_template_loop_product_title' ) ) {
        /**
         * Loop product title.
         */
        function woostify_custom_add_template_loop_product_title() {
            $options = woostify_options( false );
            if ( ! $options['shop_page_product_title'] ) {
                return;
            }
            ?>
            <h3 class="woocommerce-loop-product__title">
                <?php
                    woocommerce_template_loop_product_link_open();
                    the_title();
                    woocommerce_template_loop_product_link_close();
                ?>
            </h3>
            <?php
        }
    }
    Thread Starter almagarett

    (@almagarett)

    Thank you! it worked.

    I’d like to do the same thing but am using Divi theme. What would I need to change inside your code to have it work for my theme?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘i want to change product tiltes from h2 to h3’ is closed to new replies.