Extensions

Search Extensions

Event Tickets Shortcodes

You’ve just created tickets for your event using Event Tickets or Event Tickets Plus. Those tickets are displaying nicely on your event page. But what if you want to display them somewhere else, say, your homepage? Maybe you’ve created a landing page promoting the event and would like to drop the tickets in there.

That’s what this extension does. It adds a [tribe_tickets] shortcode to display any tickets you’ve created for any events on any WordPress page or post.

It also works for RSVPs, attendees and even provides a way to display content that is only visible to registered attendees.

Usage

There are five types of shortcodes included in this extension:

  • [tribe_tickets] – Embeds the ticket form for tickets created for an event, page or post.
  • [tribe_tickets_rsvp] – Embeds the RSVP form for RSVPs created for an event, page or post.
  • [tribe_tickets_attendees] – Displays the registered attendees for a particular event, page or post.
  • [tribe_tickets_protected_content] – Displays content that can only be accessed by someone who is logged in and registered for a particular event.
  • [tribe_tickets_rsvp_protected_content] – Displays content that can only be accessed by someone who is logged in and has sent an RSVP for a particular event.

Tribe Tickets shortcode

This shortcode displays the tickets block. It has one required parameter, the post_id. The post_id parameter is the ID of the event (post or page, depending on your site configuration) where the tickets were created.

Example usage:

[tribe_tickets post_id="123"]

The 123 value is the ID of the post/page/event where the tickets were created.

Tribe Tickets RSVP shortcode

This shortcode displays the RSVP block. It has one required parameter, the post_id. The post_id parameter is the ID of the event (post or page, depending on your site configuration) where the RSVP was created.

Example usage:

[tribe_tickets_rsvp post_id="123"]

The 123 value is the ID of the post/page/event where the tickets were created.

Tribe Tickets Attendees shortcode

This shortcode displays attendees who have purchased a ticket that was created on an event, page or post. It accepts the following parameters:

  • post_id – Required. The post_id parameter is the ID of the event, page, or post that contains the attendees to display.
  • title – Optional. This sets the title above the ticket block.

Example usage:

[tribe_tickets_attendees post_id="123" title="These fine folks are coming to my event"]

The 123 is the ID of the post/page/event the attendees will come from.

Tribe Tickets Protected Content shortcode

Content wrapped inside this shortcode will only be visible to attendees who are logged in and have registered for one or more specific events or have purchased a certain type of ticket. It supports HTML, text content, other shortcodes, oEmbeds, or any other useful content you might want.

Note: the content is still searchable by default unless you use search plugins like Relevanssi and manually add code to exclude that shortcode.

It accepts three optional parameters:

  • post_id – This is the ID of the event, page or post where tickets were created. This defaults to the current post ID if left blank.
  • ticket_ids – The ID of the ticket a user must purchase to see the content. This accepts multiple IDs in a comma-separated list and defaults to all ticket types if left blank.
  • not_ticket_ids – This defaults as empty. Provide a comma-separated list of Ticket IDs to exclude on the attendee status check for. Note: This will ensure that only attendees who have purchased other tickets will be returned.
  • ticketed – Determines whether someone should see protected content based on whether the user is or is not an attendee for the event.
    • 1 (Default) = Check that the user is an attendee before showing the content.
    • 0 =  Check that the user is not an attendee before showing the content.
  • on – This defaults to empty (not time-based). Provide event_start_date to let the content only show when the event has started, or a custom date and time string 2020-05-01 08:00:00 to specify when the content should start showing (based on the site timezone).

Examples

Example 1: Protected content based on any attendee for the current event

[tribe_tickets_protected_content]
This content will only show to attendees of the current event this shortcode is embedded on.
[/tribe_tickets_protected_content]

Example 2: Protected content based on any attendee for a specific event

[tribe_tickets_protected_content post_id="123"]
This content will only show to attendees of the event (ID: 123).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 3: Protected content based on attendees for specific tickets on a specific event

[tribe_tickets_protected_content post_id="123" ticket_ids="32,50,90"]
This content will only show to attendees of the event (ID: 123) who have purchased certain tickets (IDs: 32, 50, or 90).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 4: Protected content based on any non-attendee for the current event

[tribe_tickets_protected_content ticketed="0"]
This content will only show to people who are NOT attendees of the current event this shortcode is embedded on.
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 5: Protected content based on any non-attendee for a specific event

[tribe_tickets_protected_content post_id="123" ticketed="0"]
This content will only show to people who are NOT attendees of the event (ID: 123).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 6: Protected content based on non-attendees for specific tickets on a specific event

[tribe_tickets_protected_content post_id="123" ticket_ids="32,50,90" ticketed="0"]
This content will only show to people who are NOT attendees of the event (ID: 123) who have NOT purchased certain tickets (IDs: 32, 50, or 90).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 7: Protected content for attendees on a specific event who are not an attendee of specific tickets

[tribe_tickets_protected_content post_id="123" not_ticket_ids="32,50,90"]
This content will only show to people who are attendees of the event (ID: 123) who have NOT purchased certain tickets (IDs: 32, 50, or 90).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 8: Protected content for attendees that shows up on event start date

[tribe_tickets_protected_content post_id="123" on="event_start_date"]
This content will only show to people who are attendees of the event (ID: 123) on/after the event start date.
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Example 9: Protected content for attendees that shows up after a specific date

[tribe_tickets_protected_content post_id="123" on="2020-05-01 08:00:00"]
This content will only show to people who are attendees of the event (ID: 123) on/after May 1st, 2020 at 8am (according to the site timezone).
[/tribe_tickets_protected_content]

Where 123 is the ID of the post/page/event where the tickets were created.

Tribe Tickets RSVP Protected Content shortcode

Content wrapped inside this shortcode will only be visible to attendees who are logged in and have completed an RSVP (“going” or “not going”) for one or more specific events or completed a certain RSVP type. It supports HTML, text content, other shortcodes, oEmbeds, or any other useful content you might want.

It accepts three optional parameters:

  • post_id – This is the ID of the event, page or post where RSVPs were created. This defaults to the current post ID if left blank.
  • rsvp_ids – The ID of the RSVP user must complete to see the content. This accepts multiple IDs in a comma-separated list and defaults to all RSVP types for that event if left blank.
  • not_rsvp_ids – This defaults as empty. Provide a comma-separated list of RSVP IDs to exclude on the attendee status check for. Note: This will ensure that only attendees who have RSVP’d for other RSVP’s will be returned.
  • rsvpd – Determines whether someone should see protected content based on whether the user is or is not an attendee for the event.
    • 1 (Default) = Check that the user is an attendee before showing the content.
    • 0 =  Check that the user is not an attendee before showing the content.
  • on – This defaults to empty (not time-based). Provide event_start_date to let the content only show when the event has started, or a custom date and time string 2020-05-01 08:00:00 to specify when the content should start showing (based on the site timezone).

Examples

Example 1: Protected content based on any RSVP attendee for the current event

[tribe_tickets_rsvp_protected_content]
This content will only show to RSVP attendees of the current event this shortcode is embedded on.
[/tribe_tickets_rsvp_protected_content]

Example 2: Protected content based on any RSVP attendee for a specific event

[tribe_tickets_rsvp_protected_content post_id="123"]
This content will only show to RSVP attendees of the event (ID: 123).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 3: Protected content based on RSVP attendees for specific tickets on a specific event

[tribe_tickets_rsvp_protected_content post_id="123" ticket_ids="32,50,90"]
This content will only show to RSVP attendees of the event (ID: 123) who have RSVP'd to certain RSVP's (IDs: 32, 50, or 90).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 4: Protected content based on any RSVP non-attendee for the current event

[tribe_tickets_rsvp_protected_content rsvpd="0"]
This content will only show to people who are NOT RSVP attendees of the current event this shortcode is embedded on.
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 5: Protected content based on any RSVP non-attendee for a specific event

[tribe_tickets_rsvp_protected_content post_id="123" rsvpd="0"]
This content will only show to people who are NOT RSVP attendees of the event (ID: 123).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 6: Protected content based on RSVP non-attendees for specific tickets on a specific event

[tribe_tickets_rsvp_protected_content post_id="123" ticket_ids="32,50,90" rsvpd="0"]
This content will only show to people who are NOT RSVP attendees of the event (ID: 123) who have NOT RSVP'd to certain RSVP's (IDs: 32, 50, or 90).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 7: Protected content for RSVP attendees on a specific event who are not an attendee of specific RSVP tickets

[tribe_tickets_rsvp_protected_content post_id="123" not_rsvp_ids="32,50,90"]
This content will only show to people who are RSVP attendees of the event (ID: 123) who have NOT RSVP'd to certain RSVP's (IDs: 32, 50, or 90).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 8: Protected content for RSVP attendees that shows up on event start date

[tribe_tickets_rsvp_protected_content post_id="123" on="event_start_date"]
This content will only show to people who are RSVP attendees of the event (ID: 123) on/after the event start date.
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Example 9: Protected content for RSVP attendees that shows up after a specific date

[tribe_tickets_rsvp_protected_content post_id="123" on="2020-05-01 08:00:00"]
This content will only show to people who are RSVP attendees of the event (ID: 123) on/after May 1st, 2020 at 8am (according to the site timezone).
[/tribe_tickets_rsvp_protected_content]

Where 123 is the ID of the post/page/event where the RSVP’s were created.

Changelog

Version 1.1.0

  • March 31, 2020
  • Added support for ticket protected content that excludes certain tickets using the new `not_ticket_ids` argument like: `[tribe_tickets_protected_content post_id=”123″ not_ticket_ids=”32,50,90″]`
  • Added support for RSVP protected content that excludes certain RSVPs using the new `not_rsvp_ids` argument like: `[tribe_tickets_rsvp_protected_content post_id=”123″ not_rsvp_ids=”32,50,90″]`
  • Added support for protected content shortcodes to show on a specific date, options available are `event_start_date` and date/time formats like `2020-05-01 08:00:00` using the new `on` argument like: `[tribe_tickets_rsvp_protected_content post_id=”123″ on=”event_start_date”]`

Version 1.0.0

  • March 26, 2020
  • Initial release

Download Extension

👋 Heads up! We provide limited support for extensions, but you can still open a ticket over at our Help Desk to report any issues.
Install Instructions