The default behavior for the Tasty Recipes print button (included with each recipe) is to open the print page in the same window.

To change this behavior and have the print page open in a new tab, tech-savvy customers can add a short snippet of code to their theme'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).***

Place the code below in your functions.php file:

/**
 * Add target="_blank" to the Tasty Recipes print link, which causes the link
 * to be opened in a new window.
 */
add_filter( 'tasty_recipes_before_recipe', function( $before_recipe ) {
return str_replace( 'tasty-recipes-no-print"', 'tasty-recipes-no-print" target="_blank"', $before_recipe );
});

Save the file and test the behavior. 

Note: If you are using a custom PHP template, you will need to modify the tasty-recipes.php  file to open the print page in a new window. If you need help with this, just send over your tasty-recipes.php  file and we'll try to help.

Did this answer your question?