Home / Forums / Lafka – Fast Food Ordering WooCommerce Theme / ResolvedHow do I hide the Daily Intake boxes?
ResolvedHow do I hide the Daily Intake boxes?
- This topic has 1 reply, 2 voices, and was last updated 1 week, 2 days ago by
Alex.
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- May 16, 2023 at 4:55 pm #37503
bogdan
ParticipantI know that there isn’t a setting to hide them so I need to modify the theme’s code, but my client wants them out so there is nothing I can do.
That being said, how can I hide the “Daily Intake %” boxes that appear below energy, protein, fat…etc?
And also the string “*DI: Recommended Daily Intake based on 2000 calories diet”.May 20, 2023 at 12:45 pm #37525Alex
KeymasterHello bogdan,
The best way would be with the Lafka child theme.
– Activate the theme
– Copy following file in it’s root directory: lafka-plugin/incl/nutrition/templates/nutrition-info.php
– Modify the file by replacing its content with the following one:<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <?php if ( count( $lafka_nutrition_list ) || $lafka_product_allergens ): ?> <div class="lafka-nutrition-summary"> <?php if ( count( $lafka_nutrition_list ) ): ?> <ul class="lafka-nutrition-list"> <?php foreach ( $lafka_nutrition_list as $nutrition_name => $nutrition_value ): ?> <li <?php if ( $nutrition_name === 'lafka_nutrition_energy' ): ?> class="lafka-nutrition-energy" <?php endif; ?> > <span><?php echo esc_html( Lafka_Nutrition_Config::$nutrition_meta_fields[ $nutrition_name ]['frontend_label'] ); ?></span> <?php echo esc_html( $nutrition_value ) ?> <?php echo esc_html( Lafka_Nutrition_Config::$nutrition_meta_fields[ $nutrition_name ]['frontend_label_weight'] ) ?> </li> <?php endforeach; ?> </ul> <?php endif; ?> <?php if ( $lafka_product_allergens ): ?> <span class="lafka-nutrition-allergens"><?php esc_html_e( 'Allergens', 'lafka-plugin' ); ?>: <?php echo esc_html( $lafka_product_allergens ); ?></span> <?php endif; ?> </div> <?php endif; ?>
Regards,
Alex - AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in and have valid license to reply to this topic.