***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).***
To prevent PopupAlly HTML form loading on the print page, add the following code to your theme's functions.php file:
add_action( 'template_redirect', function() {
if ( function_exists( 'tasty_recipes_is_print' ) && tasty_recipes_is_print() ) {
remove_filter('the_content', array('PopupAlly', 'add_form_to_content'));
remove_action('wp_footer', array('PopupAlly', 'add_popup_html'));
}
});
If you use PopupAlly Pro, you will need to use this code snippet instead:
add_action( 'template_redirect', function() {
if ( function_exists( 'tasty_recipes_is_print' ) && tasty_recipes_is_print() ) {
remove_filter('the_content', array('PopupAllyPro', 'add_form_to_content'));
remove_action('wp_footer', array('PopupAllyPro', 'add_popup_html'));
}
});