{"id":1896566,"date":"2019-10-18T13:19:29","date_gmt":"2019-10-18T17:19:29","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/events-calendar-pro-widget-shortcodes-overview\/"},"modified":"2025-02-07T10:13:28","modified_gmt":"2025-02-07T15:13:28","slug":"events-calendar-pro-widget-shortcodes-overview","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/events-calendar-pro-widget-shortcodes-overview\/","title":{"rendered":"Events Calendar Pro Widget Shortcodes"},"content":{"rendered":"\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/KGIk6wwJcr8\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n\n\n\n<p>In WordPress, widgets can typically be placed in a sidebar or footer. <a href=\"https:\/\/theeventscalendar.com\/products\/wordpress-events-calendar\/\" target=\"_blank\" rel=\"noreferrer noopener\">Events Calendar Pro<\/a> ships with a number of cool widgets, but sometimes you might want to use them on your site in locations other than a sidebar.<\/p>\n\n\n\n<p>There are actually a couple of ways this can be achieved. One is to use a WordPress function called <em><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/the_widget\/\" target=\"_blank\" rel=\"noreferrer noopener\">the_widget()<\/a><\/em> in some custom coding in your theme or another plugin. Writing custom code like this is extremely flexible, but it also requires you to be comfortable writing in PHP\u2014<em>and<\/em> it comes with the burden of maintaining that code through future upgrades.<\/p>\n\n\n\n<p>A simpler alternative is to use a set of shortcodes provided by Events Calendar Pro that makes it easy to embed the widgets within pages and posts; this is what we will look at in this article.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Event Calendar Widget: <a href=\"#mini-cal-shortcode\">[tribe_mini_calendar]<\/a><\/li>\n\n\n\n<li>Event List Widget: <a href=\"#event-list-shortcode\">[tribe_events_list]<\/a><\/li>\n\n\n\n<li>Featured Venue Widget: <a href=\"#featured-venue-shortcode\">[tribe_featured_venue]<\/a><\/li>\n\n\n\n<li>Event Countdown Widget: <a href=\"#countdown-shortcode\">[tribe_event_countdown]<\/a><\/li>\n\n\n\n<li>Events By Week Widget: <a href=\"#this-week-shortcode\">[tribe_this_week]<\/a><\/li>\n\n\n\n<li><span style=\"line-height: 1.5;\">Some shortcode arguments and functions are <\/span><a style=\"line-height: 1.5;\" href=\"#common-to-all\">common to all<\/a><span style=\"line-height: 1.5;\"> of these shortcodes<\/span><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/evnt.is\/1b8o\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/06\/evergreen-ad-events-calendar-1024x384.png\" alt=\"\" class=\"wp-image-1953182\"\/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"mini-cal-shortcode\">Event Mini Calendar Shortcode<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-28-at-1.38.08-PM.png\" alt=\"[tribe_mini_calendar] shortcode\" class=\"wp-image-1952429\"\/><\/figure>\n\n\n\n<p>Using the shortcode is as easy as adding the following piece of text within a page or post:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_mini_calendar]\n<\/pre><\/div>\n\n\n<p><strong>Filters<\/strong><\/p>\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 <strong>[tribe_events view=\u201cmonth\u201d<\/strong>]<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"event-list-shortcode\">Event List Shortcode<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-28-at-1.47.34-PM.png\" alt=\"[tribe_events_list] shortcode\" class=\"wp-image-1952431\"\/><\/figure>\n\n\n\n<p>To embed the advanced list widget, simply use the following shortcode:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_events_list]\n<\/pre><\/div>\n\n\n<p><strong>Filters<\/strong><\/p>\n\n\n\n<p>The same slug and ID based filtering capabilities offered by the mini calendar shortcode can also be used by this one. Here&#8217;s an example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_events_list tags=&quot;#1024, #2048&quot; tax-operand=&quot;OR&quot; category=&quot;tickets-available&quot;]\n<\/pre><\/div>\n\n\n<p><strong>Choose which information is displayed<\/strong><\/p>\n\n\n\n<p>Also, just like the advanced list widget itself, it is possible to specify extra information which should be displayed, such as the phone number and address of each venue:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_events_list phone=&quot;yes&quot; address=&quot;yes&quot;]\n<\/pre><\/div>\n\n\n<p>Here&#8217;s a complete list of those optional details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>venue (supports multiple venues)<\/li>\n\n\n\n<li>country<\/li>\n\n\n\n<li>street<\/li>\n\n\n\n<li>city<\/li>\n\n\n\n<li>region<\/li>\n\n\n\n<li>zip<\/li>\n\n\n\n<li>phone<\/li>\n\n\n\n<li>cost<\/li>\n\n\n\n<li>organizer<\/li>\n<\/ul>\n\n\n\n<p>Finally, you can specify the maximum number of events that should be listed:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_events_list limit=&quot;10&quot;]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"featured-venue-shortcode\">Featured Venue Shortcode<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-28-at-1.40.40-PM.png\" alt=\"[tribe_featured_venue] shortcode\" class=\"wp-image-1952432\"\/><\/figure>\n\n\n\n<p>When you use the featured venue shortcode you <strong>must<\/strong> include at least one argument &#8211; the ID or slug of the venue that is being featured. Here&#8217;s an example using a slug:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_featured_venue slug=&quot;the-eiffel-tower&quot;]\n<\/pre><\/div>\n\n\n<p>It is also possible to use the venue&#8217;s post ID:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_featured_venue id=&quot;4096&quot;]\n<\/pre><\/div>\n\n\n<p>This shortcode optionally accepts one other argument &#8211; a limit for the number of events to list for the specified venue:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_featured_venue slug=&quot;the-whitehouse&quot; limit=&quot;20&quot;]\n<\/pre><\/div>\n\n\n<p>Will show the widget even if no upcoming events are scheduled for the venue:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_featured_venue slug=&quot;hollywood-bowl&quot; hide_if_empty=false]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"countdown-shortcode\">Event Countdown Shortcode<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-28-at-1.49.52-PM.png\" alt=\"[tribe_event_countdown] shortcode\" class=\"wp-image-1952434\"\/><\/figure>\n\n\n\n<p>The countdown widget can be embedded with the following shortcode:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_event_countdown id=&quot;8192&quot;]\n<\/pre><\/div>\n\n\n<p>Just like the featured venue shortcode, an ID or slug <strong>must<\/strong> be specified or it will not work. This shortcode optionally allows for two further arguments, the first of which is show seconds:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_event_countdown slug=&quot;new-year-2016&quot; show_seconds=&quot;yes&quot;]\n<\/pre><\/div>\n\n\n<p>This causes the number of seconds to be displayed. The other argument is the text to show once the event begins and the countdown is complete:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_event_countdown slug=&quot;joes-party&quot; complete=&quot;Yee hah!&quot;]\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\" id=\"this-week-shortcode\">Events By Week Widget<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2022\/03\/Screen-Shot-2022-03-28-at-1.38.24-PM.png\" alt=\"[tribe_this_week] shortcode\" class=\"wp-image-1952435\"\/><\/figure>\n\n\n\n<p>The Events By Week widget can be embedded with the shortcode <kbd>[tribe_this_week].<\/kbd><\/p>\n\n\n\n<p>You can customize the plugin in a number of ways.&nbsp;For example, you can decide how many events per day to display:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week count=&quot;2&quot;]\n<\/pre><\/div>\n\n\n<p>By default, the widget is laid out horizontally. If you want, you can do a vertical layout instead:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week layout=&quot;vertical&quot;]\n<\/pre><\/div>\n\n\n<p><strong>Start Date:<\/strong> This is used to set the week of events to show. This will find the start of the week based on your WordPress setting and use that for the first day of the week. For example if your setting is to start the week on Monday and you put the date of Wednesday the 6th it will start with Monday the 4th.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week start_date=&quot;12-07-2015&quot;]\n<\/pre><\/div>\n\n\n<p>Use the date format in your settings here: <em>Events &gt; Settings &gt; Display Tab &gt; &#8220;Date with year&#8221;<\/em><\/p>\n\n\n\n<p><strong>Week Offset:<\/strong> Use this to show a week in the future. For example if you want to always show next weeks events add a 1 and it will show the This Week Widget starting with the next start of the week.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week week_offset=&quot;1&quot;]\n<\/pre><\/div>\n\n\n<p><em>Note the offset only accepts positive numbers.<\/em><\/p>\n\n\n\n<p><strong>Hide Weekends:<\/strong> set this to &#8220;true&#8221; and it will hide Saturdays and Sundays.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week hide_weekends=&quot;true&quot;]\n<\/pre><\/div>\n\n\n<p class=\"has-theme-palette-8-background-color has-background\">Note: This can also be achieved by enabling the <strong>Hide weekends on Week View<\/strong> option in <em>Events > Settings > Display > Calendar > Calendar Display<\/em>. If this option is enabled, even if you don&#8217;t use the hide_weekends attribute, the weekend will be hidden in Week View and Events by Week widget.<\/p>\n\n\n\n<p><br><strong>Operand: <\/strong>You use this option to change between to using &#8220;and&#8221; or to use &#8220;or&#8221; for the filters. The default is &#8220;or&#8221; so if you have two event categories it will find all events with either of those. If you change to &#8220;and&#8221; it will return events that have both of those event categories.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;tribe_this_week operand=&quot;and&quot;]\n<\/pre><\/div>\n\n\n<p>Note: You can also embed the regular calendar Week View into a page wit the shortcode <strong>[tribe_events view=<strong>\u201cweek\u201d<\/strong>]<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"common-to-all\">Common Arguments<\/h4>\n\n\n\n<p>Whichever shortcode you opt for, you can always make use of these additional arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>before_widget<\/li>\n\n\n\n<li>before_title<\/li>\n\n\n\n<li>title<\/li>\n\n\n\n<li>after_title<\/li>\n\n\n\n<li>after_widget<\/li>\n<\/ul>\n\n\n\n<p>These additional arguments come built into <a href=\"https:\/\/wordpress.org\/documentation\/article\/manage-wordpress-widgets\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress&#8217;s Classic Widgets<\/a> and often will not be required when you use shortcodes, but they are there if you need them.&nbsp; We have plenty more shortcodes available in our article: <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/shortcodes\/\">Shortcodes<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>? Are you looking for shortcodes to embed full calendar views? As of version 4.3 of Events Calendar Pro, you can use a shortcode called <kbd>[tribe_events]<\/kbd> to insert full calendar views anywhere on your site. If this sounds useful, read more about this shortcode <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/embedding-calendar-views-with-the-tribe_events-shortcode\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In WordPress, widgets can typically be placed in a sidebar or footer. Events Calendar Pro ships with a number of cool widgets, but sometimes you might want to use them on your site in locations other than a sidebar. There are actually a couple of ways this can be achieved. One is to use a&#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":[114,77],"tags":[76],"stellar-product-taxonomy":[158],"class_list":["post-1896566","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-calendar-widgets","category-shortcodes","tag-shortcodes","stellar-product-taxonomy-events-calendar-pro"],"acf":[],"taxonomy_info":{"category":[{"value":114,"label":"Calendar Widgets"},{"value":77,"label":"Shortcodes"}],"post_tag":[{"value":76,"label":"Shortcodes"}],"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:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":114,"name":"Calendar Widgets","slug":"calendar-widgets","term_group":0,"term_taxonomy_id":114,"taxonomy":"category","description":"","parent":61,"count":9,"filter":"raw","term_order":"0","cat_ID":114,"category_count":9,"category_description":"","cat_name":"Calendar Widgets","category_nicename":"calendar-widgets","category_parent":61},{"term_id":77,"name":"Shortcodes","slug":"shortcodes","term_group":0,"term_taxonomy_id":77,"taxonomy":"category","description":"","parent":61,"count":16,"filter":"raw","term_order":"0","cat_ID":77,"category_count":16,"category_description":"","cat_name":"Shortcodes","category_nicename":"shortcodes","category_parent":61}],"tag_info":[{"term_id":76,"name":"Shortcodes","slug":"shortcodes","term_group":0,"term_taxonomy_id":76,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896566"}],"version-history":[{"count":5,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896566\/revisions"}],"predecessor-version":[{"id":1964167,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896566\/revisions\/1964167"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896566"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}