Overriding 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/YOUR THEME-NAME/… and then create a new folder called webnus.

For example, for Deep Theme, it would be like: http(s)://example.com/wp-content/themes/deep/webnus/modern-events-calendar/app/skins/grid/render.php.

Note 2: If you use the free version of Modern Events Calendar, you need to add “-lite” after the plugin name, so the path would be: /path/to/theme/webnus/modern-events-calendar-lite/app/skins/grid/render.php.

Overriding the templates

You can use the overriding Modern Events Calendar shortcodes skin and do it for all template files of all skins, including single skin that is for showing a single event page, monthly_view, full_calendar, cover, etc.

BTW, we recommend you avoid overriding the files as much as you can and try to make them compatible with your theme using CSS/JS because if you override the files on your theme, then your clients may not be able to use new features of it after MEC automatic update. In overriding the Modern Events Calendar shortcodes skin feature, we’ve created two functions for you to put these codes on this page or anywhere on your site:

$upcoming_events = MEC_main::get_upcoming_events(20); // 20 is number of events
$events = MEC_main::get_shortcode_events(6380); // 6380 is the shortcode ID

Report Out Dated Content

If you think the content of this page does not reflect updated information, please let us know.

Report Now
20 Comments
Sixtus October 16, 2020
| |

I am modifying the monthly_view. Which is a breeze, no problems so far, but the most essential information is missing in the event loop (I’m vardumping $event->data): Categories, Tags and Labels. Which are the most important information in a view that provides an ‘overview’, I think. How do I access those values there? Otherwise a beautiful plugin so far. But missing out on displaying that information would render the whole thing uselesss for me ? 

Vianney April 11, 2020
| |

Hi, I want to display a list of events on a page, with my own SQL request like this one :
 
$args = array(
‘post_type’ => ‘mec-events’,
    ‘orderby’          => ‘post_date’,
    ‘order’            => ‘ASC’,
    ‘post_status’      => ‘publish’,
);
$my_query = new WP_Query($args);
 
If I want to display the result on a specific calendar view, how should I do ?

joao March 13, 2020
| |

What line needs to be added to the code to add to the list shorcode the event category? Thanks

nicky.evers February 13, 2020
| |

I have been able to create a custom skin using this article for a shortcode skin, but I also want to create a custom template for the single event page. I don’t see a function provided for how to implement this. I assume I create a new file to replace the file at /plugins/modern-events-calendar/app/skins/single/default.php and place it at /theme/webnus/modern-events-calendar/app/skins/single/default.php. What do I put in my functions.php to then enable the new template I have made?
 

flowerchild November 28, 2019
| |

I wanted to override the list skin to make a small change to the events page listings. I followed the instructions by placing a copy of the render.php file in my child theme/path/to/vogue-child/webnus/modern-events-calendar/app/skins/list. Unfortunately, I could not get changes to the render.php in my child theme. Even when I created a line with bad php syntax, I got no errors. It seemed that the file wasn’t being used.
It was after several hours of trying to work out why it wasn’t working, that I realised that because I was using Modern Events Calendar Lite, the file path should be path/to/vogue-child/webnus/modern-events-calendar-lite/app/skins/list.
It would be very helpful if there was a note on the page to give the alternate path when using the lite version.