Archived topic
How to add HTML content in front of product tab
9 replies · Started by xinghui on September 8, 2022
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
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/
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
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 ?
Of course I did, I shared the link to a private message
Can you try woocommerce_after_single_product_summary instead of woocommerce_single_product_summary?
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
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.
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.
You're welcome Xinghui!