1. Home
  2. Knowledge Base
  3. Tasty Recipes
  4. Customizing Tasty Recipes
  5. Filter: Hide nutrition information in the print view

Filter: Hide nutrition information in the print view

If you're interested in using this filter to hide all nutritional information in the print view, you (or your site manager/developer) will need to add the following snippet to your site's functions.php file:

**Before doing this, make sure that you have access to your site's files via FTP (the editor in WordPress is not sufficient in case problems arise) and that you are comfortable with editing your functions.php file. Any minor error in the functions.php file can result in the “white screen of death,” which is easily fixed via FTP but is difficult to fix otherwise (and a nuisance as your site will be unavailable until fixed).***

/** * Prevent nutrional information from being displayed in the Tasty Recipes print view. */ 

add_filter( 'tasty_recipes_print_view_buttons', 'wpt_hide_nutrition_button' );
	function wpt_hide_nutrition_button( $buttons ) {
	unset( $buttons['nutrition'] );
	return $buttons;

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support