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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #503104

    Fletsch
    Participant

    Hi. 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,
    Fletsch

    Attachments:
    You must be logged in to view attached files.
    #503443

    Hung Pham
    Keymaster

    Hi 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,

    #503768

    Fletsch
    Participant

    I 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-Sells

    Here ChatGPT couldn’t help me. Hopefully you can? 🙂

    Best regards

    #503843

    Hung Pham
    Keymaster

    Hi 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,

    #504000

    Fletsch
    Participant

    Hi 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

    #504065

    Hung Pham
    Keymaster

    Hi 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,

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