Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 8, 2017 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshfeck/bee2bf7d59be77b363a7054dfd34bf45 to your computer and use it in GitHub Desktop.
Save joshfeck/bee2bf7d59be77b363a7054dfd34bf45 to your computer and use it in GitHub Desktop.
Example that shows how to add some headings between ticket selector rows. Requires WordPress + Event Espresso 4.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'wp_enqueue_scripts', 'my_ee_add_ticket_row_headings', 11 );
function my_ee_add_ticket_row_headings() {
wp_add_inline_script(
'ticket_selector',
'jQuery( document ).ready(function($) {
$(".ee-ticket-day-1-conference-only-registration-earlybird")
.before( "<tr><td colspan=\'3\'><h3>Registration</h3></td></tr>" );
$(".ee-ticket-additional-welcome-event-ticket-earlybird")
.before( "<tr><td colspan=\'3\'><h3>Social Events</h3></td></tr>" );
} );'
);
}
@prostyledev
Copy link

prostyledev commented Oct 14, 2018

HI Josh,

Is this the title of the ticket? url slug?
$(".ee-ticket-day-1-conference-only-registration-earlybird")

I'm trying to add row in between my tickets and cant get them to display.

I added the snippet you provided to my functions.php and modified the h3 and slug, but still not working.

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment