Importing Events via SQL
Importing Events via SQL in the Modern Events Calendar can be done via the following method.
Manually Importing Events via SQL
The first method for importing events to Modern Events Calendar is to use the option in the plugin.
In this method, you can simply go to the MEC dashboardImport / Export section get the XML output, and then put the action below in the functions.php:
doaction ('mecimportfile', XMLPATH);
For the second method which will be done vFew readersMEC Webhooks
What are Webhooks?
Webhooks allow your Modern Events Calendar (MEC) plugin to automatically send booking information to external services or applications when specific booking events occur. Think of webhooks as automatic notifications that trigger actions in other systems without manual intervention.
webhooks 02 - MEC Webhooks
How Do Webhooks Work?
When a bFew readersOverriding Single Event Page
In this article, we will explain the process of overriding single event page.
MEC is created by developers for developers! And it’s highly developer-friendly so you can simply override MEC templates in your theme and make it compatible with your theme style or use MEC filters/actions to customize it.
Overriding Single Event Page
With the Overriding Modern Events Calendar Single Event Page (https://webnus.net/dox/moFew readersMEC Hooks
You can find all of the MEC Hooks action and filter hooks for interacting with another piece of code in the following list:
Category Taxonomy MEC Hooks
templates/taxonomy-mec-category.php
doaction('mecbeforemaincontent');
doaction('mecbeforeeventsloop');
doaction('mecaftereventsloop');
doaction('mecaftermaincontent');
Single page
templates/single-mec-events.php
doaction('mecbeforemaincontent');
doaction('mecafteFew readersMEC Restful API
The RESTful API in Modern Events Calendar allows developers to programmatically access, retrieve, and manage event data from external applications, websites, or services. It provides a structured and standardized way to interact with MEC data (such as events, locations, organizers, and schedules) without relying on the WordPress interface. This makes it suitable for integrations with mobile apps, third-party platforms, or custom front-end implementations.
Base URL
The base URL is differFew readersIncluding MEC in Your Theme
Including MEC in your theme means for seamless integration of both, you need to adjust dummy shortcodes. If you’re going to include the Modern Events Calendar in your theme, then please use the following as a guide.
To include the Modern Events Calendar plugin in your theme, you can simply use the TGMPA plugin. It works completely fine with this plugin.
For a better User Experience, MEC imports events and shortcodes upon activation. If yFew readersOverriding Shortcode Skins
MEC supports many skins for showing events and you can customize all of them by overriding shortcode skins, and all of them are override-ready!
Overriding Shortcode Skins
For example, if you want to customize the grid skin for MEC, then you can simply put the /path/to/modern-events-calendar/app/skins/grid/render.php into /path/to/theme/webnus/modern-events-calendar/app/skins/grid/render.php.
Note 1: /path/to/theme/ means: ~root/wp-content/themes/YOURFew readersHow to get custom field on single event page
In this article, you will learn How to get custom field on single event page. The event custom fields data is stored in WordPress meta, and you can access them using the getpostmeta function. Please check the following code.
Get custom field on single event page
$eventid = gettheID(); // Or you canFew readers