-
AuthorPosts
-
October 23, 2018 at 3:36 pm #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!
October 26, 2018 at 8:31 am #1026654Hey 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.htmlBest regards,
IsmaelOctober 26, 2018 at 8:35 am #1026655Hi,
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!
October 26, 2018 at 1:45 pm #1026783Hi,
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
October 26, 2018 at 2:59 pm #1026814Hi,
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,
IsmaelOctober 28, 2018 at 2:58 pm #1027248Hi,
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,
FelixOctober 29, 2018 at 6:46 am #1027384Hi,
Replace the “woocommerce_after_single_product_summary” with “woocommerce_single_product_summary” and set the priority from 19 to 65.
Best regards,
IsmaelOctober 30, 2018 at 4:49 pm #1028154Hi Ismael,
thank you for your response, but it doesn´t work.
Could you send me the full code, please?
Thanks in advance,
FelixNovember 2, 2018 at 8:41 am #1029065Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.