What can Modern Events Calendar event API Addon do?
With the MEC event API addon, you can easily copy events from one website into another, export your scripts, or download JSON file.
View events from your WordPress website and any web application on any platform. Single Events, shortcodes, activation immediately after installation, and domain management are other features of the addon.
For installation, first, make sure that both MEC and MEC Event API are installed and activated. Then, head over to your WordPress Dashboard > Plugins > Add New and upload, install, and activate the addon
NOTE:The addon works with All version.
After activating the addon, you can go to any event or shortcode and get an API code for the event or shortcode you selected. See the images below:
By clicking Create API you will be directed to a page where you can receive your API. This page includes two parts that are explained below:
Number one is the access to the website which is supposed to show events. To manage it, you need to enter a specific domain(s) or set this API for all domains.
Therefore, click on Customization in Modern Events Calendar event API Addon and add the domain(s) that you want and then click Add Domain.
In order to remove one, click on the trash can. You can either select domain(s) or click on All Domains. This way, this API will be displayed on all the added domains. In the end, click on Submit.
In the second part you can see two fields. The first includes a script. If you click on Copy it will copy what you have in the field in the clipboard.Wherever you put this script, you will see the content that you wanted, with the same style (the content can be a shortcode or a single event). There are no limitations for displaying content, but you need to make sure which domains you want to display the script. The second field shows the same content but the difference is that this is a JSON file and you cannot use it directly. You can use the data it contains in your web application and receive different content and view them in you website or web application.
You can see samples of the used API below:
If your script isn’t working, then you need to make sure of two things:
- The script needs to be enabled on all domains or a specific one
- Contact your host provider and make sure that the ability to create iframes on your website is enabled
Please note that if you are using any of the website loading speed optimization plugins, these plug-ins might be the reason for not loading the external script links on your web pages.
Since the Event API, Add-On has a script for showing your events, you need to exclude “external link” in those plugins, so they won’t get ignored and can work properly.
Everything is fine, except for one little thing! My GDPR Cookie consent plugin on the source website is showing on the destination website.
I can deactivate the plugin on a specific page by entering the slug of the concerned page. But where can I find this slug???
Thanks for your help,
Thank you for contacting us
Please refer to webnus.net/support to create a ticket there.
Our experts will get back to you as soon as possible to resolve the issue. Thank you for your patience.
I don’t know what I am doing wrong, but it doesn’t work for me.
I followd exactly the advices above. No success! Any idea?
We found your ticket and answered to you.