Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to add an extra CSS class to tickets buttons, using the Theater for WordPress plugin.
* Adds an 'art-button' CSS class to the tickets buttons of events.
* @param array $classes The current CSS classes of tickets buttons.
* @param WPT_Event $event The event that the button belongs to.
* @return array The new CSS classes.
function add_class_to_tickets_buttons( $classes, $event ) {
// Don't add anything when inside the WordPress admin.
if ( is_admin() ) {
return $classes;
$classes[] = 'art-button';
return $classes;
add_filter( 'wpt/event/tickets/url/classes', 'add_class_to_tickets_buttons', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment