Created
March 28, 2019 15:38
-
-
Save Pebblo/5a94209a3add14a7b789b4bf0d6ba008 to your computer and use it in GitHub Desktop.
Example of how to alter the links within the 'attention box' on the EE thank you page to open in a new window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Please do not include the opening PHP tag if you already have one | |
function ee_add_target_blank_to_thank_you_page_links() { | |
wp_add_inline_script( | |
'thank_you_page', | |
'jQuery( document ).ready(function($) { | |
$("#espresso-thank-you-page-overview-dv .ee-attention a").each(function() { | |
$(this).attr("target","_blank"); | |
}); | |
});' | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'ee_add_target_blank_to_thank_you_page_links', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment