Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/alanef/display-eventbrite-custom-layout-example/archive/refs/heads/main.zipA small, working WordPress plugin that adds a custom layout to Display Eventbrite Events. Copy it, rename it and change it to build your own layout.
Custom layouts need a paid plan of Display Eventbrite Events.
Try it
-
Download this repository as a zip (Code → Download ZIP) and install it from Plugins → Add New → Upload Plugin, or clone it into
wp-content/plugins/. -
Activate it alongside Display Eventbrite Events.
-
Add the shortcode to a page:
[wfea layout="example"]
All the usual shortcode options still apply, for example
[wfea layout="example" limit="5" thumb="false" newtab="true"].
How it works
display-eventbrite-custom-layout-example.php registers the template folders
templates/
layout_example.php entry point for layout="example"
loops/
loop_example.php markup for one event
parts/
example_when_where.php a template part of your own
css/
example.css loaded only on pages using the layout
- The plugin file calls
\WidgetForEventbriteAPI\Includes\Utilities::get_instance()->register_template_dirs( plugin_dir_path( __FILE__ ) )onplugins_loaded. Display Eventbrite Events then looks in this plugin'stemplates/,templates/loops/andtemplates/parts/before its own. layout_example.phpsets the layout's CSS class prefix and name, then loads the main plugin's sharedcommontemplate.commonhandles search, pagination, the "no events" message and the details popup, and callsloops/loop_example.phponce per event.loop_example.phpbuilds each event. It reuses the main plugin's parts (thumb,header,content,booknow), which already follow the shortcode options, and adds one part of its own.parts/example_when_where.phpshows how to read the event directly through$data->utilities(get_event(),get_event_title(),get_event_start(),get_event_eb_url(),get_element()), escaping everything on output.
Make it your own
- Rename the folder and the main plugin file, and change the plugin header.
- Rename
layout_example.phpandloop_example.phptolayout_{yourname}.phpandloop_{yourname}.php, and setlayout_nameto{yourname}in the layout file. - Change
layout_classand the CSS to match. - Use it with
[wfea layout="{yourname}"].
A file in templates/parts/ with the same name as one in Display Eventbrite Events replaces
that part for every layout, for example templates/parts/booknow.php.
To see what is available, var_dump( $data->utilities->get_event() ) inside a loop or part
prints the full event, and the
developer documentation
covers the template functions.
Licence
GPL-2.0-or-later. See LICENSE.