{"id":1174,"date":"2019-07-12T13:03:35","date_gmt":"2019-07-12T13:03:35","guid":{"rendered":"https:\/\/webnus.site\/dox\/?p=1174"},"modified":"2023-10-31T10:37:55","modified_gmt":"2023-10-31T10:37:55","slug":"overriding-shortcode-skins","status":"publish","type":"knowledgebase","link":"https:\/\/webnus.net\/dox\/modern-events-calendar\/overriding-shortcode-skins\/","title":{"rendered":"Overriding Shortcode Skins"},"content":{"rendered":"\n<p><a href=\"http:\/\/webnus.net\" target=\"_blank\" data-type=\"link\" data-id=\"webnus.net\" rel=\"noreferrer noopener\">MEC<\/a> supports many skins for showing events and you can customize all of them by overriding shortcode skins, and all of them are override-ready!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Overriding_Shortcode_Skins\"><\/span>Overriding Shortcode Skins<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For example, if you want to customize the grid skin for MEC, then you can simply put the <strong>\/path\/to\/modern-events-calendar\/app\/skins\/grid\/render.php<\/strong> into <strong>\/path\/to\/theme\/webnus\/modern-events-calendar\/app\/skins\/grid\/render.php<\/strong>.<\/p>\n\n\n\n<p><strong>Note 1:<\/strong> <strong>\/path\/to\/theme\/<\/strong> means: <strong>~root\/wp-content\/themes\/YOUR THEME-NAME\/&#8230;<\/strong> and then create a new folder called webnus.<\/p>\n\n\n\n<p>For example, for Deep Theme, it would be like: <strong>http(s):\/\/example.com\/wp-content\/themes\/deep\/webnus\/modern-events-calendar\/app\/skins\/grid\/render.php<\/strong>.<\/p>\n\n\n\n<p><strong>Note 2:<\/strong> If you use the free version of Modern Events Calendar, you need to add &#8220;<strong>-lite<\/strong>&#8221; after the plugin name, so the path would be: <strong>\/path\/to\/theme\/webnus\/modern-events-calendar-lite\/app\/skins\/grid\/render.php<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Overriding_the_templates\"><\/span>Overriding the templates<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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&#8217;ve created two functions for you to put these codes on this page or anywhere on your site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n$upcoming_events = MEC_main::get_upcoming_events(20); \/\/ 20 is number of events\n$events = MEC_main::get_shortcode_events(6380); \/\/ 6380 is the shortcode ID\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>MEC supports many skins for showing events and all of them are override ready! For example if you want to customize the grid skin for MEC<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","knowledgebase_cat":[50],"class_list":["post-1174","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-developer-other"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/1174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/comments?post=1174"}],"version-history":[{"count":2,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/1174\/revisions"}],"predecessor-version":[{"id":9796,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/1174\/revisions\/9796"}],"wp:attachment":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/media?parent=1174"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase_cat?post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}