Viewing 3 replies - 1 through 3 (of 3 total)
  • Saif

    (@babylon1999)

    Hello @edtrevisanbr,

    But when it comes to Headings hierarchy, I don’t know how to change from H3 (standard) to H4.

    So if I understand this correctly, you want the product titles on that page to switch to an h4 tag.

    I’m not sure how are you calling these products on that blog post, but changing them on the store page can be done with the snippet below.

    /* Switch product title to h4 */
    
    remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
    add_action( 'woocommerce_shop_loop_item_title', 'custom_template_loop_product_title', 10 );
    function custom_template_loop_product_title() {
      echo '<h4 class="product-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h4>';
    }

    You can add it to your functions.php file or use a code snippet plugin.

    Please try it and let us know how it goes. ??

    Thread Starter edtrevisanbr

    (@edtrevisanbr)

    Hi @babylon1999

    Thanks for your answer. As you can see in this image – https://snipboard.io/AeB6Gu.jpg I’ve used Code Snippets to insert the code, but nothing happened on the end.

    Inside the blog post I’m using exactly this shortcode:
    [products limit=”6″ columns=”3″ category=”geladeiras” cat_operator=”AND”]

    anastas10s

    (@anastas10s)

    Hey there @edtrevisanbr, thank you for reaching back about this!

    I’m afraid I was not able to check out things further, as the URL links to a 404 page error.

    A couple of thoughts:
    1. Have you made sure to clear server-side and browser cache, before testing if the code snippet has any effect on the site?
    2. The alternative of changing the CSS properties for the H3 instead, is a viable option, or otherwise?

    Kindly keep in mind, we are not developers and only offer support for existing functionality.

    Please see our Support Policy: https://www.woocommerce.com/support-policy/

    For assistance with customization or development with your site, we recommend that you seek help from:

    * A local web developer
    * Codeable.io
    * WooExperts
    * Stackexchange

    If you are comfortable coding yourself and have questions, I would also recommend that you consider:

    * WooCommerce developer Portal
    * WooCommerce Slack Community
    * Advanced WooCommerce Facebook group

    I hope that helps you to figure it out.

    Feel free to get back to us if you have further questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change from H3 to H4 on shortcode’ is closed to new replies.