Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1025471

    Hi,

    I am using the below function to display a widget above the footer area.

    add_action(‘ava_before_footer’,’avia_footer_top_column’);
    function avia_footer_top_column(){
    dynamic_sidebar( ‘wishlist’ );
    }

    What i would like so for that widget to be displayed only in the products pages.

    Also i would like it to be shown above the related products section.

    Please see the link below for a better understanding. The widget i am talking about is the one shown below the related products section now.

    http://netinfoweb.net/tsiropoulos/product/engagement-diamond-rings_31/

    Thank you in advance!

    #1026654

    Hey mike.rav,

    Thank you for using Enfold.

    Just add the is_product or is_shop conditional function before the dynamic_sidebar.

    // https://docs.woocommerce.com/wc-apidocs/function-is_product.html
    / https://docs.woocommerce.com/wc-apidocs/function-is_shop.html

    Best regards,
    Ismael

    #1026655

    Hi,

    Thank you so much for the reply,

    Would you please be kind enough and provide me with an example of what your are suggesting?

    Thanks again!

    #1026783

    Hi,

    Never mind. I figured it out :)

    Also i would like it to be shown above the related products section. How do it do that please?

    As you can see here: http://netinfoweb.net/tsiropoulos/product/luxury-diamond_10/

    the custom widget is below the related products section.

    Thank you

    #1026814

    Hi,

    Glad that you figured it out. You can use this filter to add something above the related products section.

    add_action( 'woocommerce_after_single_product_summary', 'avia_woocommerce_before_related_products', 19);
    function avia_woocommerce_before_related_products() {
       // add something here
    }

    Best regards,
    Ismael

    #1027248

    Hi,
    i have a similar problem. Ismael’s code works, but I need the widget on another position.
    What is the code for placing the widget directly below the product description?
    Info: We have added the sidebar on the left. Our sidebar is very long. Thus, we would like to insert further general information on the right side, so directly below the product description.
    Ultimately, we would like to insert a contact form there. I think this should be possible with the widget, right?
    Thanks in advance for your feedback and the code.
    Best,
    Felix

    #1027384

    Hi,

    Replace the “woocommerce_after_single_product_summary” with “woocommerce_single_product_summary” and set the priority from 19 to 65.

    Best regards,
    Ismael

    #1028154

    Hi Ismael,
    thank you for your response, but it doesn´t work.
    Could you send me the full code, please?
    Thanks in advance,
    Felix

    #1029065

    Hi,

    This is the code:

    add_action( 'woocommerce_single_product_summary', 'avia_woocommerce_before_related_products', 65);
    function avia_woocommerce_before_related_products() {
       // add something here
    }

    Best regards,
    Ismael

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