Home Forums WoodMart support forum Change product title html tag

Change product title html tag

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

    ay.souaf
    Participant

    hello, after reading about the html tags i found that the h1 should be the name of the website and h2 the title of each page, i want to change the product title from h1 to h2 searched everywhere for it but still couldnt find it thank you in advance

    #592949

    Hello,

    Can you please share the screenshot where do you want to change the product title from H1 to H2? On the single product page or the entire site.

    Best Regards.

    #592951

    ay.souaf
    Participant

    only on the product page – https://brefshop.ma/product/peluche-reversible-octopus-jouet/
    it shows 2 h1 however each page should only contain 1 h1

    #593107

    Hello,

    Please try to add this code to the child theme in the functions.php file.

    
    if ( ! function_exists( 'woodmart_single_product_title' ) ) {
        function woodmart_single_product_title() {
            echo '<h2 class="wd-entities-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h2>';
        }
    }
    
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
    add_action( 'woocommerce_single_product_summary', 'woodmart_single_product_title', 5 );

    Best Regards.

Tagged: 

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