In Progressrearrange produkt view
- This topic has 6 replies, 3 voices, and was last updated 2 years, 8 months ago by
Alex.
- AuthorPosts
- March 8, 2021 at 5:09 pm #29324
Horst
ParticipantMarch 8, 2021 at 5:21 pm #29329Althemist
KeymasterHello Horst,
I am afraid that would not be possible. The nutrition guide is part of the short description, so it’s displayed above the product variations and order form.
March 8, 2021 at 5:24 pm #29331Horst
Participantwow, this was fast. is it possible via a 3rd party plugin maybe?
March 8, 2021 at 6:00 pm #29340Horst
Participantdidnt you guys implemented this nutrition guido? so in fact you have to be able to change the parts in its postions? just a thought…
March 9, 2021 at 1:53 pm #29354Althemist
KeymasterHello Horst,
Yes, it’s our won custom functionality. What I meant was that there is no option in the theme controls to change it’s position. The only option would require the use of a child theme and some coding experience.
I’ll ask our lead developer Alex to give you instructions. Also, please note that you may also need to adjust the spacing with CSS.
Regards,
DimitarMarch 9, 2021 at 2:42 pm #29368Horst
ParticipantThat would be great! Thanks.
March 10, 2021 at 5:44 pm #29383Alex
KeymasterHello Horst,
Here is the whole code you need to move the nutrition info section below the order button on single product view. It can be used either from child theme or any third party plugin. If used from plugin, will be better to use the ‘plugins_loaded’ hook instead of ‘init’.
add_action( 'init', 'lafka_child_nutrition_override' ); /** * Move Nutrition info section below Order button in single product view */ function lafka_child_nutrition_override() { global $Lafka_Nutrition_Display; if ( isset ( $Lafka_Nutrition_Display ) ) { remove_action( 'woocommerce_single_product_summary', array( $Lafka_Nutrition_Display, 'display_nutrition' ), 7 ); add_action( 'woocommerce_single_product_summary', array( $Lafka_Nutrition_Display, 'display_nutrition' ), 39 ); } }
Regards,
Alex - AuthorPosts
You must be logged in and have valid license to reply to this topic.