-
-
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
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 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 ); |
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 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