
They’ve simply been filtered to provide content from the current event.
You can continue to use familiar template tags in event loops, such as the_post_thumbnail(), the_title(), the_content(), etc. There are a few things to keep in mind while working with Eventbrite_Query loops. While ( $events->have_posts() ) : $events->the_post() ?> This allows for easy creation of special-purpose loops, widgets, creative page templates – any combination of events you want to display in a theme. With that in mind, we developed the Eventbrite_Query class, so fetching and displaying events is as simple as making a secondary loop (in fact, the class extends WP_Query). It was important to us that working with the Eventbrite API plugin should be a simple and familiar process for theme developers, with a low barrier to entry. Eventbrite integration with Twenty Fifteen. To see some custom templates in action, check out any of the Twenty* default themes their templates are included in the plugin. That’s it! If support is declared, the plugin will use those templates if they exist, or fall back to the plugin’s templates. Repeat step 3 with eventbrite-single.php and your own single template. Of course, there’s no reason you couldn’t add a content-eventbrite.php to your theme, if you prefer. The Eventbrite templates don’t use template parts for the post markup, so you may need to compare with content.php or the like.
Also, verify that your markup for archive titles matches the Eventbrite template’s page title.
Compare the markup in eventbrite-index.php to your own index.php and adjust as necessary. Create an eventbrite folder in your theme, and copy over the plugin’s main template files ( tmpl/eventbrite-index.php and tmpl/eventbrite-single.php). * Add theme support for the Eventbrite API plugin.Īdd_action( 'after_setup_theme', 'themeslug_setup' )
There are no arguments, and usually this can be added to a theme’s existing setup function.
Add a support declaration, hooked to after_setup_theme. This simple process guarantees that events fit perfectly with the theme design, and adding support should take no more than ten minutes.
While the Eventbrite API plugin can display events in any theme, events look their best if the theme declares support and provides tailored templates. The plugin gives theme developers three ways to interact with the Eventbrite API: In early 2014, Eventbrite announced its new upcoming REST API, and this became the perfect opportunity to give theme developers an easy-to-use set of tools for working with Eventbrite events: the Eventbrite API plugin. Eventbrite and WordPress are the perfect fit, but until now, integrating the two has not been for the faint of heart.