• Resolved kenteush29

    (@kenteush29)


    Hello guys,
    I use the Divi theme and I’d like to change manually the header of product titles on the main page and on related products on product pages (from H2 to H3).

    For therelated products (product pages), the divi theme support advised changing the “related” file created by your plugin with H3 instead of the H2. But it doesn’t work.

    Do you have any solution for that ?
    It’s pretty bad for SEO right now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @kenteush29. I’m not sure exactly how Divi interacts with our page templates, so this might be slightly different with them, but, in general, the answer to this question is that you’d need to modify the associated template files to output H3s instead of H2s. You can read more about our template structure and modifying templates here.

    Thread Starter kenteush29

    (@kenteush29)

    Here is the response of the divi support :

    “You will need to modify their templates, which we are not totally familiar with their coding nature, that being said I would suggest you getting in touch with the Woocommerce author and requesting the snippet changes from them!”

    Maybe you could help with that ?

    Hi @kenteush29. Our templates are designed in such a way that they are fully customizable. You can copy the default templates into your theme using the instructions in the previous link. As such, typically you want to use this method to customize them rather than snippets.

    As for this particular change, customizations like this are technically outside the scope of our support. I can’t say what the exact code is that you’ll need to change, but after a bit of digging, I think templates/single-product/up-sells.php and templates/cart/cross-sells.php might be the templates you’d want to modify. Both have h2 headings and are related to up-sells and cross-sells. This might be the title of the section itself rather than the product titles, though. Still, starting with those templates, you should be able to find the place where the product titles themselves are set.

    Thread Starter kenteush29

    (@kenteush29)

    Yes you’re right, for the moment I don’t use these templates so I edited the file “related”
    /templates/single-product/related.php
    And it changes nothing, I edited the H2 to H3, and it doesn’t change on the front end. Do you know why ?

    Hi @kenteush29. That may have been the wrong thing to modify. I only looked in the template files, but that HTML might be getting created somewhere else and then injected into a template somewhere. You could try searching the WooCommerce plugin for the text string h2 and trying to narrow it down that way. You can do this on GitHub if you don’t have an IDE or some other way to do it locally.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any further questions!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Product headers’ is closed to new replies.