There are a number of ways to integrate events from LiveWhale Calendar into WordPress.
The simplest approach is to create and save events widgets in LWC and paste the code anywhere you like into WordPress, using the WYSIWYG text editor (View Source tool) or an “HTML” element in your WordPress sidebar.
This integration was developed a few years back, and we know there are more of you using WordPress+LWC these days — if you’ve got your own approach to incorporating LWC widgets into your WordPress site and are willing to share, we’d love to hear about it!
The instructions below uses the Advanced Custom Fields plugin to add custom fields for page/post editors, which stores variables like “group” and “tag”.
Once you click Export to PHP, you will be taken to a screen with the generated php code. Copy and paste the code into your master functions.php file if you want to apply it to all themes in a multisite site.
The next step is the PHP code that constructs the actual widget code that pulls events from LiveWhale. This file, content-events-inline-list.php, should be placed under your theme folder.
Then within your page template, include this line of code to include the above.
<?php get_template_part( 'content', 'events-inline-list' ); ?>
Finally, create an events widget through LiveWhale. This widget will get called by its ID from the WordPress code. Line #40 of the content-events-inline-list.php file, is the line of code that calls the events widget by the ID. You will need to update this line to reflect your url to your calendar and the ID number of your widget.
$url='http://your-calendar.lwcal.com/live/widget/2'.$extra_args.'?external_widget=1';