Site logo

[Support request] How to add HTML content in front of product tab

Home Forums Support [Support request] How to add HTML content in front of product tab

Home Forums Support How to add HTML content in front of product tab

  • This topic has 9 replies, 3 voices, and was last updated 3 years ago by Fernando.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2336970
    xinghui

    I want to add a custom HTML content in front of the product description tab of a single product page, but I only found the method woocommerce_product_after_tabs, this method can only be added after the description tab, is there any way to add it before the description
    HERE IS MY PROBLEM IMAGE LINK:https://i.postimg.cc/tRn91LNt/TAB-CONTENT-CSS.jpg

    #2337012
    David
    Staff
    Customer Support

    Hi there,

    you can use the woocommerce_after_single_product_summary hook.

    See here:

    https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    #2337047
    xinghui

    hi,David, I added a hook block directly to the element, and then set the display rules, but the display is not on the tab, what I want is to display on the entire page, not only on the right half, my kind of Is it correct? Or do I need to re-customize a code module?
    Test the rules set by hook blocks:https://i.postimg.cc/pdYV0F1V/add-test-tab-html.jpg
    Test display image link:https://i.postimg.cc/MGZmTyBg/display.jpg
    I want to display image link:https://i.postimg.cc/bw0d5WZj/full-Desplay.jpg
    Please help me check it,thank you very much

    #2337201
    David
    Staff
    Customer Support

    You may need to use some CSS to force the element to be 100% – can you share a link to where i can see the issue ?

    #2337233
    xinghui

    Of course I did, I shared the link to a private message

    #2337494
    Fernando
    Customer Support

    Can you try woocommerce_after_single_product_summary instead of woocommerce_single_product_summary?

    #2337715
    xinghui

    I changed woocommerce_after_single_product_summary instead of woocommerce_single_product_summary as you said, but it is not displayed in front of the product tab, but below the product tab
    I put a link to my question in the private message area
    problem image:
    1) https://i.postimg.cc/wT85J2HZ/display-the-under-tab.jpg
    2) https://i.postimg.cc/nhQt5nNC/not-display-html.jpg

    #2337723
    Fernando
    Customer Support

    Can you try woocommerce_after_single_product_summaryagain and set the priority to 1?

    If it doesn’t work, can you keep it with that setting, and we’ll look at the best approach.

    #2337829
    xinghui

    Thank you very much, I succeeded after setting it to 1. It seems to be a priority issue. Thank you for your support. It’s amazing.

    #2339976
    Fernando
    Customer Support

    You’re welcome Xinghui!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.