Background Loading RSVPMaker Event Listings From Any Site To Any Site

Using the new widget and/or the new Gutenberg block that have been added to RSVPMaker 6.4.2, you can display a listing of events that will be dynamically loaded from your own site or any other site that implements RSVPMaker. This feature uses JavaScript and RSVPMaker API endpoints to fetch a listing of events in the background and display it in a widget or in the body of a page.

Widget loading an event listing in the background (GIF runs in a loop)

A separate RSVPMaker Widget plugin (see below) is available for sites that want to fetch listings from a remote sites without having the full RSVPMaker plugin installed locally. Or you can embed an HTML/JavaScript code snippet in a non-WordPress site to achieve the same effect.

Advantage of Dynamic Loading

One advantage of using this technique, even for displaying events from the local website, is it may work better with websites that have implemented caching. The client can be served a cached HTML version of the page but will still see a current listing of events because it is loaded in the background via a JavaScript call to the API endpoint.

Site visitors may briefly see a “Loading …” message while event posts are being retrieved.

API urls are in the format:

https://rsvpmaker.com/wp-json/rsvpmaker/v1/future
(all future events)

or

https://rsvpmaker.com/ wp-json/rsvpmaker/v1/type/featured
(events tagged with the event type “featured”)

RSVPMaker Widget plugin

A separate RSVPMaker Widget plugin is available for download as a zip file (and pending as a submission to the wordpress.org plugin repository). I have been using it on websites where the full RSVPMaker is not active or needed.

Example: a WordPress multisite implementation for a Toastmasters district, where divisions within the district have their own blogs but RSVPMaker is not active on those subordinate sites. Instead, RSVPMaker is active on the main domain, and division-specific events are designated with an RSVPMaker Type tag.

The RSVPMaker Widgets plugin allows me to display a listing of each division’s events on the division site homepages, while still maintaining a single calendar of events from across the district.

HTML/JavaScript Snippet

You can also embed events listing into any website, including static HTML sites and those that run a different content management system, using the HTML / JavaScript code snippet shown below. Change the div ID and the parameters for the creation of the widget object to match your needs and modify to taste.

On a WordPress site, you can use the Custom HTML widget or the Custom HTML editor block to add this code (assuming it’s allowed by your site security) as an alternative to installing the RSVPMaker Widget plugin.

Leave a Reply