{"id":1896552,"date":"2019-10-18T13:19:26","date_gmt":"2019-10-18T17:19:26","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/configuring-the-calendar-widget-2\/"},"modified":"2026-04-23T15:05:48","modified_gmt":"2026-04-23T19:05:48","slug":"events-calendar-widget","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/events-calendar-widget\/","title":{"rendered":"Using the Events Calendar Widget"},"content":{"rendered":"\n<p>We&#8217;re going to take a look at the Events Calendar widget, also known as the Mini Calendar. We&#8217;ll cover the basics of adding this Pro-specific widget to a sidebar, how to configure it, and some tips and tricks on how to customize the widget further.<\/p>\n\n\n\n<p>So, let&#8217;s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding\">Adding the Widget to a Sidebar<\/h2>\n\n\n\n<p>The Events Calendar widget is a feature that comes bundled with The Events Calendar PRO. To activate it, you&#8217;ll&nbsp;need to make sure that The Events Calendar PRO is first <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/downloading-and-installing-the-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener\">installed and active<\/a>&nbsp;on your site.<\/p>\n\n\n\n<p>From there, head over to Appearance \u2192 Widgets from the WordPress dashboard. You&#8217;re looking for a widget called&nbsp;<strong>Events Calendar<em>.<\/em><\/strong> Click on the &#8220;+&#8221; button\/&#8221;Add Block,&#8221; and then search for the widget. Careful, because this could be easily confused with the&nbsp;<strong>Calendar<\/strong> widget, which is packaged with WordPress and not related to The Events Calendar at all.<\/p>\n\n\n\n<p>See the Events Calendar widget? Drag it over to the sidebar widget area of your choice, then save your settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/05\/calendar-widget-1.gif\" alt=\"\" class=\"wp-image-1949624\"\/><\/figure>\n\n\n\n<p>There we have it. Now we can go to the front end of our website and see the Mini Calendar in all its mini and mighty glory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/04\/Screen-Shot-2021-04-29-at-9.42.57-AM.png\" alt=\"\" class=\"wp-image-1949585\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"settings\">Widget Settings<\/h2>\n\n\n\n<p>First thing you might notice when adding the widget to the sidebar is that there are&nbsp;a few options that allow us to customize things a bit. These are the available options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Title:<\/strong> This is the heading that sits above the widget on the front end of the site. By default, it is &#8220;Events Calendar,&#8221; but can be changed to anything we&#8217;d like.<\/li>\n\n\n\n<li><strong>Number of Events to Show:<\/strong> This allows you&nbsp;to set the maximum number of events that display in the list below the calendar at any given time. By default, this is set to five, but can be any number between one and ten.<\/li>\n\n\n\n<li><strong>Add a filter:<\/strong> This&nbsp;option&nbsp;allows you&nbsp;to&nbsp;limit the events that display in the widget to certain categories and tags. Let&#8217;s say we only want events categorized as Conference to display in the widget. Perfect, add a filter! How about Conferences and Workshops? Add two filters!<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-widget-block\">Widget Block<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/11\/Screen-Shot-2021-11-15-at-2.36.01-PM.png\" alt=\"Mini calendar block\" class=\"wp-image-1951278\"\/><\/figure>\n\n\n\n<p>When using the Block Editor, you can add the Mini Calendar as a block instead. Simply search for Mini Calendar under blocks and you&#8217;ll find all of the same available options.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"embedding\">Embedding the Widget via Shortcode<\/h2>\n\n\n\n<p>Another awesome thing about the Events Calendar widget is that it can be embedded on any page or post&nbsp;<em>outside<\/em> of the sidebar. In other words, we can place it anywhere we want!<\/p>\n\n\n\n<p>Embedding the widget can be as easy as pasting this shortcode into any page or post:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[tribe_mini_calendar]<\/pre>\n\n\n\n<p>Of course, the calendar widget also comes complete with an advanced set of filtering options, and these can also be used with the shortcode. Here&#8217;s an example that looks for events in the <em>party<\/em> category:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_mini_calendar category=&quot;party&quot;]\n<\/pre><\/div>\n\n\n<p>We can supply a list of several categories or tag slugs (we just need to separate them with commas), and we can also use IDs by prefixing them with the <strong>#<\/strong> symbol:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_mini_calendar categories=&quot;party, black-tie&quot; tag=&quot;#512&quot;]\n<\/pre><\/div>\n\n\n<p>Note how we used <em>categories<\/em> (plural), there. Singular and plural forms are interchangeable &#8211; and the same goes for tags. Last but not least, we can use the count attribute to control how many events are listed below the mini calendar:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_mini_calendar count=&quot;15&quot;]\n<\/pre><\/div>\n\n\n<p>You can also add a tax-operand attribute to the calendar so that multiple categories or tags can display at once:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_mini_calendar tags=&quot;cabbage, broccoli&quot; tax-operand=&quot;AND&quot;]\n<\/pre><\/div>\n\n\n<p><strong>Note: <\/strong>You can also embed the regular calendar Month View with the shortcode [tribe_events view=\u201cmonth\u201d]<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\" id=\"customizing\">Troubleshoot the Calendar Widget<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-calendar-widget-overflows-a-sidebar\">The Calendar Widget Overflows a Sidebar<\/h3>\n\n\n\n<p>Sometimes the calendar widget is larger than your sidebars. Commonly this is because the theme\u2019s stylesheet has added padding to all table cells. This can be countered by adding a rule that strips that padding back out of our mini calendar grids specifically. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-mini-calendar td,\n.tribe-mini-calendar th {\npadding: 0;\n}\n<\/pre><\/div>\n\n\n<p>If you find that the mini calendar grids are still too big on iPad sized screens and would like to shrink it, you can reduce the font size with this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n@media (max-width: 850px) {\n.tribe-mini-calendar {\nfont-size: 10px;\n}\n}\n<\/pre><\/div>\n\n\n<p>That will target the mini calendar grids font size after the screen size of the viewing device is below 850px in width. You can change that number to whatever size you would like. In addition, you may have to add more selectors to that CSS to get it to work with your theme.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"customizing\">Customizing the Widget<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-styling-with-css\">Styling with CSS<\/h3>\n\n\n\n<p>You can apply custom CSS to the Events Calendar widget. The widget&#8217;s styles are loaded from <code>widget-shortcode-skeleton.css<\/code> (or <code>widget-shortcode-full.css<\/code> if you&#8217;re loading the full stylesheet). To target the widget with your own CSS rules, use the base class:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n.tribe-events-widget-shortcode-events-month {\n    \/* your styles here *\/\n}\n<\/pre><\/div>\n\n\n<p>For guidance on where to add custom CSS and how widget stylesheets work, see our <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-css\/\">Customizing CSS<\/a> guide.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-using-calendar-views\">Using Calendar Views<\/h3>\n\n\n\n<p>The Events Calendar Widget will take styles from the main calendar Month View, so any template changes that you make to the Month View will impact the widget as well.<\/p>\n\n\n\n<p>If you&#8217;d like to make changes, you can create a template override of the corresponding Month View <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/calendar-template-files-v2\/\" data-type=\"URL\" data-id=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/calendar-template-files-v2\/\" target=\"_blank\" rel=\"noreferrer noopener\">template<\/a>.<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-change-the-view-calendar-link\">Change the &#8216;View Calendar&#8217; Link<\/h3>\n\n\n\n<p>The &#8216;View Calendar&#8217; link in the Events Calendar widget defaults to the main events archive page set under Events &gt; Settings &gt; General &gt; Viewing. By default, this is the <code>\/events\/<\/code> slug.<\/p>\n\n\n\n<p>If you have created a custom page to display your calendar using a shortcode, or if you&#8217;ve simply changed the main calendar slug, you&#8217;ll need to update this link to point to your new URL.<\/p>\n\n\n\n<p>This guide provides a simple code snippet to update the destination URL for the &#8216;View Calendar&#8217; link in the Events Calendar widget.<\/p>\n\n\n\n<p>This snippet uses jQuery to select the &#8216;View More&#8217; link in the Events Calendar widget (<code>.tribe-events-widget-events-month__view-more<\/code>) and updates its <code>href<\/code> attribute to a custom URL.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nadd_action( &#039;wp_footer&#039;, function() {\n?&gt;\n&amp;lt;script&gt;\njQuery(document).ready(function($) {\n  \/\/ Replace &#039;https:\/\/example.com\/new-page\/&#039; with your desired custom URL\n  var customCalendarUrl = &#039;https:\/\/example.com\/new-page\/&#039;;\n\n  \/\/ Target the &#039;View Calendar&#039; link in the Events Calendar widget\n  $(&#039;.tribe-events-widget-events-month__view-more a&#039;)\n    .attr(&#039;href&#039;, customCalendarUrl);\n});\n&amp;lt;\/script&gt;\n&amp;lt;?php\n} );\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">How to Use the Code<\/h4>\n\n\n\n<p><strong>Replace the URL:<\/strong> Change the dummy URL <code>'https:\/\/example.com\/new-page\/'<\/code> to the exact URL of your custom calendar page.<\/p>\n\n\n\n<p><strong>Add the snippet:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the code to your child theme&#8217;s <strong><code>functions.php<\/code><\/strong> file.<\/li>\n\n\n\n<li><strong>Or<\/strong>, preferably, use a dedicated <strong>Code Snippet plugin<\/strong> for easier management.<\/li>\n<\/ul>\n\n\n\n<p>Clear any site cache (plugin, server, or CDN) to ensure the new code is loaded on the front end.<\/p>\n\n\n\n<p>For more information, please see our guide on the <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">best practices for implementing custom code snippets<\/a>.<\/p>\n\n\n\n<p>This approach is simpler than <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-template-files-2\/\">overriding the widget&#8217;s template file<\/a>, and ensures the &#8216;View Calendar&#8217; link points to your custom URL.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\" id=\"h-hide-the-view-calendar-link\">Hide the \u201cView Calendar\u201d Link<\/h3>\n\n\n\n<p>You can completely disable the link using a PHP snippet. Add the following code to your theme&#8217;s <code>functions.php<\/code> file or through a plugin like <strong><a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a><\/strong>. Using this method if you want to remove the link from the DOM entirely (cleaner code output).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'tribe_template_pre_html:events-pro\/v2\/widgets\/shortcodes\/components\/view-more', '__return_false' )<\/code><\/pre>\n\n\n\n<p>This method removes the link from the HTML entirely, so it won\u2019t be rendered on the frontend. <\/p>\n\n\n\n<p>If you&#8217;d rather keep the markup and just visually hide the link, you can use this CSS snippet instead. Use this method if you prefer a non-invasive method that only affects the visual display.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.tribe-events-widget-events-month__view-more {display: none !important;}<\/code><\/pre>\n\n\n\n<p>You can add the CSS code in one of the following ways:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Via <strong>Customizer<\/strong>: Appearance \u2192 Customize \u2192 Additional CSS<\/li>\n\n\n\n<li>In your theme or child theme\u2019s <code>style.css<\/code> file<\/li>\n\n\n\n<li>Through a custom CSS plugin<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-show-event-content-in-the-widget\">Show Event Content in the Widget<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-scenario\">The Scenario<\/h4>\n\n\n\n<p>Let&#8217;s say we have placed the&nbsp;Events Calendar widget in the sidebar of a page. We can expect to see a lot of information about our events, including the dates, times, location, and more, depending on our widget settings.<\/p>\n\n\n\n<p>That&#8217;s nice and dandy, but what if we want to include a little more information about our events? Specifically, let&#8217;s find a way to add the event&#8217;s excerpt below the dates.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h4 class=\"wp-block-heading\" id=\"h-before\">Before:<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"1024\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.51.54@2x-673x1024.png\" alt=\"\" class=\"wp-image-1963237\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.51.54@2x-673x1024.png 673w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.51.54@2x-197x300.png 197w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.51.54@2x-768x1168.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.51.54@2x.png 818w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h4 class=\"wp-block-heading\" id=\"h-after\">After: <\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"1024\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.53.58@2x-652x1024.png\" alt=\"\" class=\"wp-image-1963238\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.53.58@2x-652x1024.png 652w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.53.58@2x-191x300.png 191w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.53.58@2x-768x1206.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-12.53.58@2x.png 828w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-how-it-s-done\">How it&#8217;s Done<\/h4>\n\n\n\n<p>The key here is that we can use the default WordPress function for <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/the_excerpt\">the_excerpt()<\/a> to display content from the event directly in the widget. For this use case, we will be changing the mobile view templates, so please note that this will affect the widget <em>and<\/em> the mobile month view of your calendar. <\/p>\n\n\n\n<p>This will require a template override. If you&#8217;re new to overriding calendar templates, then it&#8217;s a good idea to check out our <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/themers-guide\/\">Themer&#8217;s Guide<\/a>, which will walk you through the process step-by-step. The basic idea is that we will be creating a copy of one of the plugin&#8217;s templates, then adding it to our theme files. This allows us to override the template without touching the core code of the plugin.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Make a copy of the Mobile View&#8217;s&nbsp;<em>mobile-event.php<\/em> file.<\/strong> This is located in <code>plugins\/the-events-calendar\/src\/views\/v2\/month\/mobile-events\/mobile-day\/mobile-event.php<\/code>.<\/li>\n\n\n\n<li><strong>Make a new folder in your theme directory.<\/strong> Call it&nbsp;<em>tribe<\/em>.<\/li>\n\n\n\n<li><strong>Make a new folder in that one.<\/strong> Call it&nbsp;<em>events<\/em>.<\/li>\n\n\n\n<li><strong>Make a new folder in that one.<\/strong> Call it&nbsp;<em>v2<\/em>.<\/li>\n\n\n\n<li><strong>Make a new folder in that one.<\/strong> Call it&nbsp;month.<\/li>\n\n\n\n<li><strong>Make a new folder in that one.<\/strong> Call it&nbsp;<em>mobile-events<\/em>.<\/li>\n\n\n\n<li><strong>Make one last new folder in that one.<\/strong> Call it&nbsp;<em>mobile-day<\/em>.<\/li>\n\n\n\n<li><strong>Add the file.<\/strong> Drop the copied&nbsp;<em>mobile-event.php<\/em> file in that last folder.<\/li>\n<\/ul>\n\n\n\n<p>Presto! Now that the template is in our theme directory, we can modify to suit our needs. In this case, we will add this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php the_excerpt(); ?&gt;<\/code><\/pre>\n\n\n\n<p>&#8230;right below the single event cost. As of this writing, that is after Line 30 of the template.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"226\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-13.06.14-1024x226.png\" alt=\"\" class=\"wp-image-1963239\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-13.06.14-1024x226.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-13.06.14-300x66.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-13.06.14-768x170.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2019\/10\/CleanShot-2024-10-23-at-13.06.14.png 1186w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Note &#8211; we have added some italics, but you can style this however you see fit. Now, we can save our work, head back to our widget and see the event&#8217;s excerpt displays with the rest of the event&#8217;s information. Nice work!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-show-today-s-events\">Show Today&#8217;s Events<\/h3>\n\n\n\n<p>If you use a Mini Calendar Widget on your site then on the first-page load it will show you the number of events from the month that you set up in the back-end. If you set up 5 events and there are less than that on the current day, it will show you events from the coming days as well.<\/p>\n\n\n\n<p>If you click on a specific date in the calendar, then you will only see the events for that day.<\/p>\n\n\n\n<p>If you would like to show only today&#8217;s events on the first-page load as well, then the below snippet will help you.<\/p>\n\n\n\n<p>Copy the below code into your (child) theme&#8217;s <em>functions.php<\/em> file (or wherever you usually put custom code).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_action( &#039;pre_get_posts&#039;, &#039;tribe_andras_custom_mini_calendar_starting_query&#039; );\n\nfunction tribe_andras_custom_mini_calendar_starting_query( $query ) {\n\n\t$is_widget = $query-&gt;get( &#039;is_tribe_widget&#039; );\n\t$event_display = $query-&gt;get( &#039;eventDisplay&#039; );\n\n\tif ( $is_widget &amp;&amp; $event_display == &#039;custom&#039; ) {\n\t\t$query-&gt;set( &#039;eventDisplay&#039;, &#039;day&#039; );\n\t}\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-remove-next-month-s-dates-from-current-month\">Remove Next Month\u2019s Dates from Current Month<\/h3>\n\n\n\n<p>Sometimes the next month&#8217;s first few days appear on the Mini Calendar View calendar, depending on how each month is structured. If you&#8217;d like, you can remove these dates by adding a PHP snippet on your site and then using custom CSS added to your theme&#8217;s stylesheet. We&#8217;ll provide you with the snippets you need to make this happen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"465\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/mini_month_view.png\" alt=\"\" class=\"wp-image-1962677\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/mini_month_view.png 567w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/08\/mini_month_view-300x246.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/figure>\n\n\n\n<p>First, you&#8217;ll need to add the following PHP snippet on your functions.php theme file or using the <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Code Snippets<\/a> plugin:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter(\n\t&#039;tribe_events_views_v2_view_month_template_vars&#039;,\n\tfunction( $template_vars, $view ) {\n\t\t\/\/ current time.\n\t\t$now = Tribe__Date_Utils::build_date_object( $template_vars&#x5B;&#039;now&#039;] );\n\t\t\/\/ requested date - for month view this is the first of the month.\n\t\t$request_date = $template_vars&#x5B;&#039;request_date&#039;];\n\t\t\n\t\t\/\/ if requested date isn&#039;t the same as the current date\n\t\tif ( $now-&gt;format( &#039;Y-m-d&#039; ) !== $request_date-&gt;format( &#039;Y-m-d&#039; ) ) {\n\t\t\t\/\/ pass the requested date as the current date\n\t\t\t$template_vars&#x5B;&#039;today_date&#039;] = $template_vars&#x5B;&#039;request_date&#039;]-&gt;format( &#039;Y-m-d&#039; );\n\t\t}\n\t\t\n\t\treturn $template_vars;\n\t},\n\t10,\n\t2\n);\n<\/pre><\/div>\n\n\n<p>This snippet is needed to make sure that hiding the respective days works in other months as well, not only the current one.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-template-override\">The Template Override<\/h4>\n\n\n\n<p>Create a <strong>mobile-day.php<\/strong> file on your <code>\/wp-content\/themes\/[your-theme or child-theme folder]\/tribe\/events\/v2\/month\/mobile-events<\/code> folder (you may need to create the folders if you haven&#8217;t already done so). After that, place the following as the content of the mobile-day.php file.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nuse Tribe__Date_Utils as Dates;\n\n$events = ! empty( $day&#x5B;&#039;events&#039;] ) ? $day&#x5B;&#039;events&#039;] : &#x5B;];\nif ( ! empty( $day&#x5B;&#039;multiday_events&#039;] ) ) {\n\t$events = array_filter( array_merge( $day&#x5B;&#039;multiday_events&#039;], $events ) );\n}\n$mobile_day_id = &#039;tribe-events-calendar-mobile-day-&#039; . $day&#x5B;&#039;year_number&#039;] . &#039;-&#039; . $day&#x5B;&#039;month_number&#039;] . &#039;-&#039; . $day&#x5B;&#039;day_number&#039;];\n\n$classes = &#x5B; &#039;tribe-events-calendar-month-mobile-events__mobile-day&#039; ];\n\nif ( $today_date === $day_date ) {\n\t$classes&#x5B;] = &#039;tribe-events-calendar-month-mobile-events__mobile-day--show&#039;;\n}\n?&gt;\n\n&lt;div &lt;?php tribe_classes( $classes ); ?&gt; id=&quot;&lt;?php echo sanitize_html_class( $mobile_day_id ); ?&gt;&quot;&gt;\n\n\t&lt;?php if ( count($events) ) : ?&gt;\n\n\t\t&lt;?php foreach ( $events as $event ) : ?&gt;\n\t\t\t&lt;?php \n\t\t\t\t$first_day_of_month = date( &#039;Y-m-d&#039;, strtotime ( &#039;first day of&#039; . $today_date ) );\n\t\t\t\t\n\t\t\t\t$end_day_of_month = date( &#039;Y-m-d&#039;, strtotime( &#039;last day of&#039; . $today_date ) );\n\t\t\t\t\n\t\t\t\tif ( $event-&gt;dates-&gt;start-&gt;format (&#039;Y-m-d&#039;) &lt; $first_day_of_month || $event-&gt;dates-&gt;start-&gt;format (&#039;Y-m-d&#039;) &gt; $end_day_of_month ) { \n\t\t\t\t\tcontinue;\n\t\t\t\t}\t\n\t\t\t\telse {\t\t\t\n\t\t\t?&gt;\n\n\t\t\t&lt;?php $event_date = $event-&gt;dates-&gt;start-&gt;format( Dates::DBDATEFORMAT ); ?&gt;\n\n\t\t\t&lt;?php $this-&gt;template( &#039;month\/mobile-events\/mobile-day\/day-marker&#039;, &#x5B; &#039;events&#039; =&gt; $events, &#039;event&#039; =&gt; $event, &#039;request_date&#039; =&gt; $day_date ] ); ?&gt;\n\n\t\t\t&lt;?php $this-&gt;setup_postdata( $event ); ?&gt;\n\n\t\t\t&lt;?php $this-&gt;template( &#039;month\/mobile-events\/mobile-day\/mobile-event&#039;, &#x5B; &#039;event&#039; =&gt; $event ] ); ?&gt;\n\n\t\t\t&lt;?php } ?&gt;\n\n\t\t&lt;?php endforeach; ?&gt;\n\n\t\t&lt;?php $this-&gt;template( &#039;month\/mobile-events\/mobile-day\/more-events&#039;, &#x5B; &#039;more_events&#039; =&gt; $day&#x5B;&#039;more_events&#039;], &#039;more_url&#039; =&gt; $day&#x5B;&#039;day_url&#039;] ] ); ?&gt;\n\n\t&lt;?php else : ?&gt;\n\n\t\t&lt;?php\n\t\t$this-&gt;template(\n\t\t\t&#039;components\/messages&#039;,\n\t\t\t&#x5B;\n\t\t\t\t&#039;classes&#039; =&gt; &#x5B; &#039;tribe-events-header__messages--mobile&#039;, &#039;tribe-events-header__messages--day&#039; ],\n\t\t\t\t&#039;messages&#039; =&gt; $mobile_messages,\n\t\t\t]\n\t\t);\n\t\t?&gt;\n\n\t&lt;?php endif; ?&gt;\n&lt;\/div&gt;\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"h-the-css-snippet\">The CSS Snippet<\/h4>\n\n\n\n<p>There are a few different ways to add custom CSS to your WordPress site. For more information on how to do that, check out the <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/k\/customizing-css\/\" target=\"_blank\" rel=\"noreferrer noopener\">Customizing CSS<\/a> knowledge base article.<\/p>\n\n\n\n<p>To remove the next and previous month&#8217;s dates from the calendar, use this CSS snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-events-view--shortcode div.tribe-events-calendar-month__day--next-month {\n  visibility: hidden !important;\n}\n<\/pre><\/div>\n\n\n<p>To remove the previous month&#8217;s dates from the calendar, use this snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-events-view--shortcode div.tribe-events-calendar-month__day--past-month {\n    visibility: hidden !important;\n}\n<\/pre><\/div>\n\n\n<p>And, to remove both the previous month and upcoming month dates from the calendar, use this snippet:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: css; title: ; notranslate\" title=\"\">\n.tribe-events-view--shortcode div.tribe-events-calendar-month__day--next-month,\n.tribe-events-view--shortcode div.tribe-events-calendar-month__day--past-month  {    \n     visibility: hidden !important;\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>We&#8217;re going to take a look at the Events Calendar widget, also known as the Mini Calendar. We&#8217;ll cover the basics of adding this Pro-specific widget to a sidebar, how to configure it, and some tips and tricks on how to customize the widget further. So, let&#8217;s get started. Adding the Widget to a Sidebar&#8230;<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[347],"tags":[105],"stellar-product-taxonomy":[158],"class_list":["post-1896552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-widgets","stellar-product-taxonomy-events-calendar-pro"],"acf":[],"taxonomy_info":{"category":[{"value":347,"label":"How To"}],"post_tag":[{"value":105,"label":"Widgets"}],"stellar-product-taxonomy":[{"value":158,"label":"Events Calendar Pro"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":347,"name":"How To","slug":"how-to","term_group":0,"term_taxonomy_id":347,"taxonomy":"category","description":"","parent":0,"count":109,"filter":"raw","term_order":"0","cat_ID":347,"category_count":109,"category_description":"","cat_name":"How To","category_nicename":"how-to","category_parent":0}],"tag_info":[{"term_id":105,"name":"Widgets","slug":"widgets","term_group":0,"term_taxonomy_id":105,"taxonomy":"post_tag","description":"","parent":0,"count":8,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896552"}],"version-history":[{"count":12,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896552\/revisions"}],"predecessor-version":[{"id":1969975,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896552\/revisions\/1969975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896552"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}