Recipes

Changing the 'Free' event price to '0' (zero)

Description When you enter a price or a price range for an event and it is or starts with zero (0), then on the front-end it will show up as 'Free' If you would rather like to see the number zero instead of 'Free', there are two easy ways to do that. Option 1 - with a snippet Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code). function tribe_tec_change_free_to_zero ( $translation, $text, $domain ) { $custom_text = array( 'Free' ...

Using Venues for Related Events

The Related Events feature of Events Calendar Pro (https://theeventscalendar.com/product/wordpress-events-calendar-pro/) allows you to display additional upcoming events on your single events pages, based on the event category (https://support.theeventscalendar.com/787141-Event-Categories). If you're not using event categories or simply find it more useful to show your users other events happening at the same venue, this snippet is here to help! function tribe_modify_related_posts_args ( $args ...

Sorting Events Alphabetically

By default, events will be sorted by their start date. We have occasionally been asked about changing the sort order to be alphabetical by the event title. Good news! This is possible with the following snippet, which you can add to the functions.php file of your child theme: function tribe_change_event_order( $query ) { if ( tribe_is_month() ) { $query->set( 'orderby', 'title' ); $query->set( 'order', 'ASC' ); } return $query; } add_filter( 'pre_get_posts', 'tribe_change_event_order', 99...

Removing "Free" from Event Cost Range

If your event has RSVPs or free tickets in addition to paid tickets (say the most expensive ticket is $10), then the cost range for that event will show as "Free - $10" by default. In some cases, showing the event as potentially being free might not be ideal. You can remove "Free" from the cost by adding the following snippet to the functions.php file of your child theme: function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) { if ( $cost == 0 || $cost == 'Free' ) { $cost = str...

Hide Ticket Remaining or Available Quantity with CSS

Description Use the CSS snippet given below to hide the available ticket quantity shown in the ticket or RSVP. Usage Copy the below code into your (child) theme's style.css file, or add it to Appearance > Customize > Additional CSS box (or wherever you usually put custom styling). Plugins Event Tickets and Event Ticket Plus Snippet /*list view*/ span.tribe-tickets-left{ display: none !important; } /*single view*/ span.tribe-tickets-remaining{ display:none !important; } di...

Show Only Today's Events on the Mini Calendar Widget on First Load

Description If you use a Mini Calendar Widget on your site then on the first page load it will show you the number of events from the month that you set up in the back-end. If you set up 5 events and there are less than that on the current day, it will show you events from the coming days as well. If you click on a specific date in the calendar, then you will only see the events for that day. If you would like to show only today's events on the first page load as well, then the below snipp...

Hide a Day in Month View

Description On some occasions you might want to hide some days (the whole column) in Month view. Here is how you can do that. The below CSS snippet will hide the last two days of the week. So if you have Monday set as the first day of the week under Setting > General on your WordPress dashboard, then it will hide Saturday and Sunday. Usage Copy the below code into your (child) theme's style.css file, or add it to Appearance > Customize > Additional CSS box (or wherever you usu...

Force ZIP Code to Stay in One Line

Description The different countries have different requirements when it comes to ZIP code or address formatting. One such rule is that the ZIP code has to be on one line. However, if the ZIP code has a space, it will break into two lines when there is not enough space. This can be overcome with a simple CSS trick. Usage Copy the below code into your (child) theme's style.css file, or add it to Appearance > Customize > Additional CSS box (or wherever you usually put custom styling)...

Formatting Specific Views Only / Body Classes for Views

Description If you would like to change the looks of a specific view of the calendar there are body classes which you can use. Here is the list: List view and Map view .events-list Map view only .tribe-events-map Month view .events-gridview Day view .tribe-events-day Photo view .events-photo Week view .tribe-events-week Plugins The Events Calendar Notes - Originally written in March 2019 - Tested with The Events Calendar 4.8.2 - Author: András Guseo Di...

Hiding the Tooltip Popup on Month View

Description On month view, when you hover over an event a little box will pop up with more event details. In case you would like to get rid of this here is what you need to do. Usage Copy the below code into your (child) theme's style.css file, or add it to Appearance > Customize > Additional CSS box (or wherever you usually put custom styling). Plugins - The Events Calendar Snippet .events-gridview .tribe-events-tooltip { display: none !important; } Notes ...

Decreasing the waiting time between an order placed and the attendee data created.

Description You might have noticed that some time (around 5 minutes) has to pass after an order has been placed before you can see the attendee and order data, and before the ticket is sent out via email to the user. More specifically it will take about 5 minutes for: - the attendee to show up on the Attendees page of the event - the order show up on the Orders page of the event - the buyer to receive the tickets This is a safeguarding measure we put in place because we have rece...

Show the publicaton date as the pubDate in the events RSS feed

Description The Events Calendar provides and RSS feed for the events. By default the pubDate value is changed to the event start date, so the events show up at the time when they happen and not when they were created. However, this can be changed back to the original publication date (the date when the event was published on the website) with the following snippet. Usage Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code). Plugins...

Changing the number of events in iCal export

Description The Events Calendar PRO includes a nifty option for you and your visitors to export the events on your calendar in a flash. Visit your calendar and you'll notice a button at the bottom. (Refer to the Exporting Events (https://support.theeventscalendar.com/940160-Exporting-events) article for details on the basic functionality.) By default clicking that button will give you the next 30 events. It is possible to change that however. Usage Copy the below code into your (child) ...

What Is a Recipe?

Welcome to our book of recipes! (https://support.theeventscalendar.com/588715-Recipes) Recipes are a type of article within our knowledgebase that we hope you will find useful but which (unlike our other articles) should not be regarded as formal documentation. They typically contain examples of customizations, solutions to unusual or niche problems and other things that fall outside of the normal scope of support. Recipes will not always be a perfect match for your needs, but our hope is they...

Genesis Framework and Attendee Registration

Description As of ET/ET+ 4.9 The attendee details are now collected on a new, separate screen instead of the event page where the attendee form used to be. The default slug for this page is 'attendee-registration'. When using a theme based on the Genesis Framework and having a specific setting, the Attendee Registration page will not show up properly. It will show a kind of an excerpt of that page. The setting in question can be found under Genesis > Theme Settings > Content Archive. ...

Hide the 'Log in before purchasing' link

Description When using Tribe Commerce to sell tickets, there is a 'Log in before purchasing' link at the bottom of the ticket form. This is a link that will allow the users to create an account, but it doesn't enforce them to do so. The link is not affected by the setting under Events > Settings > Tickets tab > Login requirements section > Require users to log in before they purchase tickets. The below method will allow you to hide or remove this link when it is not needed, but...

Add a list of category links below the search bar

By default, event views do not include a clickable list of categories. It's possible to add this sort of functionality by installing Filter Bar (https://theeventscalendar.com/product/wordpress-events-filterbar/) or, depending on your needs, the third party plugin The Events Calendar Category Colors (https://wordpress.org/plugins/the-events-calendar-category-colors/). Both are great but, sometimes, they may offer more than you need or you may prefer to start with a simpler custom solution that y...

Show the 'Sold Out!' message for events that are in the past

Description By default the 'Sold out!' message is not shown for past events. This snippet brings it back. Screenshot Usage Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom php code). Plugins Event Tickets Snippet add_action( 'tribe_events_inside_cost', 'soldout_in_past' ); function soldout_in_past() { if ( tribe_is_past_event() && tribe_events_has_soldout() ) { echo '<span class="tribe-out-of-stock">Sold out</sp...

Customize the ‘From’ name and from email address of the RSVP email sent to the user

Description When an email is sent from a WordPress site, then usually the sender shows up like this: From: WordPress <wordpress@yourdomain.com> This will also be the case if the website visitors RSVP to an event. They will get a confirmation from the above email address, which might be confusing. The below snippet will help you change that easily. Usage Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code. Plugins Event Tic...

Show the time of registration / purchase of an RSVP / ticket on the attendee list of an event

Description The following code will show the time of registration / purchase of an RSVP / ticket on the attendee list of an event. Usage Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code. Plugins Event Tickets, (Event Tickets Plus) Snippet add_action( 'event_tickets_attendees_table_ticket_column', 'add_registration_time_to_attendee_details' ); function add_registration_time_to_attendee_details( $item ) { if ( ! isset( $ite...

Select different templates for different event categories

By default, all event views are rendered using the same template (defined in the Events ‣ Settings ‣ Display screen). With some creativity, though, it's possible to tell WordPress to use a completely different template. In this recipe we are going to pick a different template based on the requested event category. For example, if we have a category called WP Meetups (the slug for which is 'wp-meetups') and someone visits example.com/events/category/wp-meetups (http://example.com/events/category...