Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Pebblo / example.php
Created March 28, 2019 15:38
Example of how to alter the links within the 'attention box' on the EE thank you page to open in a new window.
<?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");
});
});'
@Pebblo
Pebblo / tw_ee_default_post_content.php
Created December 31, 2019 11:54
Example of how to add a default description to EE events.
<?php // Please do not add the opening PHP tag if you already have one
add_filter('default_content', 'tw_ee_default_post_content', 2, 10);
function tw_ee_default_post_content($post_content, $post){
if(get_post_type($post) == 'espresso_events'){
$post_content = 'Add your default EE post content here';
}
return $post_content;
}