Skip to content

Block Editor Integration

Block Editor Integration

Displaying event information on your site should not require shortcode memorization or template file editing. Tickets Please ships 8 Gutenberg blocks that you can drop into any page or post, configure visually in the sidebar, and preview in real time. Each block pulls live data from your events, so content stays current without manual updates.

All blocks register under the tickets-please namespace and appear in the block inserter under the Tickets Please category.

Available Blocks

Events List

Block name: tickets-please/events-list

Displays a filterable list of upcoming events. Use this on your homepage, a dedicated events page, or in a sidebar column.

AttributeTypeDefaultDescription
countNumber5Number of events to show
categoryStringFilter by event category slug
show_dateBooleantrueDisplay event dates
show_venueBooleantrueDisplay venue names

Event Details

Block name: tickets-please/event-details

Shows the date, time, cost, and key details for a single event. Useful on event landing pages or when embedding an event summary in a blog post.

AttributeTypeDefaultDescription
event_idNumberThe event post ID to display

Event Countdown

Block name: tickets-please/event-countdown

Renders a live countdown timer to the event start date. The countdown updates on page load and displays days, hours, minutes, and seconds remaining.

AttributeTypeDefaultDescription
event_idNumberThe event post ID to count down to

Event Tickets

Block name: tickets-please/event-tickets

Displays the ticket purchase interface for a specific event, including ticket names, prices, quantity selectors, and the Add to Cart button. This is the primary block for selling tickets on event pages.

AttributeTypeDefaultDescription
event_idNumberThe event post ID whose tickets to display

Event RSVP

Block name: tickets-please/event-rsvp

Renders the RSVP registration form for free events. Visitors can register directly from any page where you place this block.

AttributeTypeDefaultDescription
event_idNumberThe event post ID to accept RSVPs for

Venue Details

Block name: tickets-please/venue-details

Shows the full venue information — name, address, phone, website, and map (if a Google Maps API key is configured). Useful for venue-specific pages or when embedding venue info in event descriptions.

AttributeTypeDefaultDescription
venue_idNumberThe venue post ID to display

Mini Calendar

Block name: tickets-please/mini-calendar

A compact month-view calendar showing days with events highlighted. Clicking a day navigates to the day view for that date. Works well in sidebars and footer areas.

AttributeTypeDefaultDescription
countNumber1Number of months to display

Event Categories

Block name: tickets-please/event-categories

Lists your event categories with optional event counts. Visitors can click a category to see all events in that category.

AttributeTypeDefaultDescription
show_countBooleanfalseDisplay the number of events per category
hierarchicalBooleantrueShow parent/child category relationships

Adding Blocks to a Page

  1. Open any page or post in the Block Editor.
  2. Click the + block inserter button.
  3. Search for “Tickets Please” or scroll to the Tickets Please category.
  4. Click the block you want to insert.
  5. Configure block attributes in the right sidebar under Block Settings.
  6. Preview the page to see the block output with live data.

Blocks that require an event_id or venue_id show a search field in the sidebar where you can type the event or venue name to find and select it.

Classic Editor Fallback

If you use the Classic Editor plugin or your theme disables the block editor, Tickets Please falls back gracefully. The plugin calls maybe_disable_block_editor() to detect the active editor environment and adjusts its behavior accordingly.

In the Classic Editor, event fields appear as meta boxes below the content area instead of inline blocks. You can still use shortcodes to embed event content on any page.

Block JavaScript

The block editor scripts are registered from assets/js/blocks-editor.js. This file is enqueued only in the block editor context, so it does not add any frontend JavaScript weight for visitors.

Using Blocks in Non-Event Pages

All 8 blocks work on any post type that supports the block editor, not just event posts. You can add an Events List block to your homepage, a Mini Calendar to a sidebar page, or an Event Countdown to a promotional blog post. The blocks pull data from your events regardless of where they are placed.

Common Questions

Do I need the Block Editor to use Tickets Please? No. All block functionality has a shortcode equivalent. If you use the Classic Editor, page builders, or theme templates, you can achieve the same output with shortcodes.

Can I use multiple instances of the same block on one page? Yes. Each block instance is independent. You could place two Events List blocks on the same page with different category filters to show events from different categories side by side.

Do blocks work in the Full Site Editor? Yes. You can add Tickets Please blocks to templates and template parts in the Full Site Editor (FSE). This lets you include event listings in your site header, footer, or sidebar templates.

Why does my event block show “No event selected”? Blocks that require an event_id or venue_id need you to select a specific event or venue in the block settings sidebar. Click the block and choose an event from the search field on the right.

Can I style the blocks with custom CSS? Yes. Each block outputs semantic HTML with predictable CSS classes following the tec- prefix convention. You can target these classes in your theme’s stylesheet or the WordPress Customizer’s Additional CSS panel.

Do Tickets Please blocks work with Elementor, Divi, or other page builders? Dedicated page builder widgets are not currently available. However, all page builders support WordPress shortcodes, so you can use the Shortcodes Reference to embed event content in any builder.

Next Steps