Home › Forums › WoodMart support forum › Show content via hook in the tab with the product description.
Show content via hook in the tab with the product description.
- This topic has 5 replies, 2 voices, and was last updated 1 year, 6 months ago by
Hung Pham.
-
AuthorPosts
-
October 10, 2023 at 6:23 pm #503104
FletschParticipantHi. I am using a plugin for Conditional WooCommerce Content and can show content there according to criteria like attributes or tags. I would like to show additional content from this plugin on the product page directly in the first tab below the product description. Is there a hook I can use for this? See screenshot form the pugin, for what I can enter.
“woocommerce_after_single_product_description” unfortunately does not work, then the content is displayed above the tabs. Is there a hook from Woodmart directly for the tab with the product description? Or how can I solve this?
Thanks in advance for your help.
Best reagrds,
FletschAttachments:
You must be logged in to view attached files.October 11, 2023 at 6:00 pm #503443
Hung PhamKeymasterHi Fletsch,
Thanks for reaching to us.
All WooCommerce default hooks are used in our theme, you can try with other hooks to see if it works.
Let me know how it goes.
Regards,
October 12, 2023 at 6:28 pm #503768
FletschParticipantI think it’s not a default hook to write something directly in the description tab after the main description. I hoped there is a hook for it as your theme is also using individuall ones like for example “woodmart_woocommerce_after_sidebar”. But ChatGTP helped me to find a solution.
Another thing I can’t solve: How can I re-arrange Up-Sells, Related Products and Extra Content Block? I’d like to show them in this order:
1. Related Products
2. Extra Content Block
3. Up-SellsHere ChatGPT couldn’t help me. Hopefully you can? 🙂
Best regards
October 13, 2023 at 8:52 am #503843
Hung PhamKeymasterHi Fletsch,
Glad to hear previous issue has been resolved.
Add below code to functions.php file into Child theme
add_action( 'wp', 'woodmart_reorder_content', 10000 ); if (!function_exists('woodmart_reorder_content')) { function woodmart_reorder_content() { remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 20 ); remove_action( 'woodmart_woocommerce_after_sidebar', 'woodmart_product_extra_content', 20 ); add_action( 'woodmart_woocommerce_after_sidebar', 'woodmart_product_extra_content', 9 ); add_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 8 ); } }
Regards,
October 13, 2023 at 2:47 pm #504000
FletschParticipantHi Hung Pham
Thanks a lot for your answer. It was almost working, but Extra Content seems to have Position 30. That’s working:
add_action( 'wp', 'woodmart_reorder_content', 10000 ); if (!function_exists('woodmart_reorder_content')) { function woodmart_reorder_content() { remove_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 20 ); remove_action( 'woodmart_woocommerce_after_sidebar', 'woodmart_product_extra_content', 30 ); add_action( 'woodmart_woocommerce_after_sidebar', 'woodmart_product_extra_content', 9 ); add_action( 'woodmart_woocommerce_after_sidebar', 'woocommerce_output_related_products', 8 ); } }
Best regards
October 13, 2023 at 6:53 pm #504065
Hung PhamKeymasterHi Fletsch,
Glad to hear your issue has been resolved. Keep us in mind for future questions and concerns, we’re always here to help!
If you have a quick minute we always appreciate a 5-star rating for our theme and customer and technical support.
https://themeforest.net/item/woodmart-woocommerce-wordpress-theme/reviews/20264492
Your feedback is the motivation to improve our work and services.
Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register