How to Use Shortcodes to Create Multiple Calendars on Your WordPress Site

how-to-use-shortcodes-create-multiple-calendars

Shortcodes are small pieces of code that pack a punch. They allow you to add functionality to your website with a shorthand that your WordPress site can read and interpret without having to write a single line of code.

And Events Calendar Pro comes standard with shortcodes. You can use the [tribe_events] shortcode to embed a calendar on any WordPress page or post on your website. From there, you can customize each shortcode to only include certain events, venues, organizers, and beyond.

Take it to the next level by adding event categories to each of your shortcodes. This will allow you to create numerous calendars on a single WordPress install by simply adding a few words to each page.

The case for categories

With event categories, you can arrange and sort your events how you like. Then, you can exhibit individualized calendars throughout your WordPress site based on the categories you created.

For example, if you host workshops, you can utilize categories to display different sorts of workshops on separate pages.

How to use a shortcode to display category calendars

Online mediums Philip Dykes and Kerry McLeod use the Weekly Workshops category shortcode [tribe_events category=“weekly-workshops”] in Photo View to present their recurring workshops.

Duxbury Student Union also uses shortcodes with categories to show off its various offerings. Below you’ll see only the half-day camp events. On another page entirely, they feature the full-day camps using a different category shortcode.

Duxbury Student Union uses category shortcodes to display calendars on their WordPress site

How to add categories to your events

Now that you’ve seen some stellar examples of how adding category shortcodes to your WordPress site may be beneficial, let’s go through how to implement this feature on your own site.

You can create events as per usual, but this time be sure to choose a pre-existing category or create a new one in the right sidebar with the Block Editor.

How to add categories to your events

Next, go to Event Categories to find the slug of your category, which you’ll use to build a page of events with just that one category.

Finding event categories slug on a WordPress site

In this example, we’ll use the Cooking Class category, so the slug that you want is “cooking-class”.

You can then use the shortcode [tribe_events category= “cooking-class”] to display all of your events within that category.

Add a new WordPress page or post and include a shortcode block with your desired category shortcode.

Adding a [tribe_events] category shortcode to your WordPress site

Publish the page and your first category calendar is now ready on your website! Rinse and repeat for as many calendars as you like on your WordPress site.

How to add category shortcode on a WordPress site

Events Calendar Pro shortcodes for the win

It’s easy to create personalized calendars across your WordPress site with Events Calendar Pro in hand. 

Love using shortcodes? We’ve got even more to share! Check out our widget shortcodes to add a calendar to sidebars, footers, and more. See available shortcodes for all of our products in our Shortcodes Guide.