Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active June 5, 2018 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/8b1ad370832f740c48375b05cc1a1a02 to your computer and use it in GitHub Desktop.
Save Pebblo/8b1ad370832f740c48375b05cc1a1a02 to your computer and use it in GitHub Desktop.
Example of how to add some additional text after the datetime filter checkbox section/before the ticket selector
<?php //Please do not include the opening PHP tag if you do not already have one
//This adds text after the datetime selector using Javascript.
function tw_ee_add_message_after_datetime_checkboxes() {
if( is_single() ) {
wp_add_inline_script(
'ticket_selector',
'jQuery(document).ready(function ($) {
var $checkbox_dropdown = $(".checkbox-dropdown-selector-wrap-dv");
$checkbox_dropdown.after(
"<span class=\'important-notice\'>Some additional text</span>"
);
});'
);
}
}
add_action( 'wp_enqueue_scripts', 'tw_ee_add_message_after_datetime_checkboxes', 11 );
<?php //Please do not include the opening PHP tag if you do not already have one
function tw_ee_add_text_before_ticket_selector() {
echo "<span class='important-notice'>Some additional text</span>";
}
add_action('AHEE__ticket_selector_chart__template__before_ticket_selector', 'tw_ee_add_text_before_ticket_selector');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment