Search
Close this search box.

How to Add Google Calendar to WordPress

[updated_on]
Share this post:

Among the various features that are provided by default with our smartphones, tablets and computers, Calendar is an obvious one. Nowadays, calendars are also being integrated with websites. Today, I will discuss how you can integrate Google Calendar with your WordPress website.

Preparing Google Calendar

First of all, download the Google Calendar Events plugin from the repository and install it. Once you have activated the plugin, you will find a new menu titled ‘GCal Events’ in the dashboard.

Add Google Calendar Gcal Menu
Gcal Menu in WordPress Admin

In order to use the plugin, you will need the public feed of your Google Calendar. To get the feed, go to Google Calendar and log in, if you aren’t logged in already. Hover over the calendar you want to use and click on the downwards arrow. Click on ‘Calendar Settings.’ Find the section named ‘Calendar Address’ on the resulting page and click ‘XML’ of that section. Copy the link from the pop-up box.

Add Google Calendar Gcal Integrating Calendar
Setting your Google Calendar to have a public feed

Setting up Google Calendar

Now, get back to your WordPress dashboard. Go to GCal Events > Add New. Provide a title. Paste your copied URL into the ‘GCal Feed URL’ field. There are lots of other options available below. I will briefly discuss the important ones here.

Add Google Calendar Gcal Feed Settings
Gcal Feed Settings

The first option, ‘Search Query’, will allow you to only display the events matching with the provided term(s). If ‘Expand Recurring Event’s’ is checked, then recurring events will be displayed each time the event occurs. ‘Retrieve Events From’ and ‘Retrieve Events Until’ are used to set the start and end dates of the events to display. The plugin also allows you to set custom date and time formats. If not set, they will use the default format. ‘Timezone Adjustment’ is self-explanatory, isn’t it?

Next, ‘Cache Duration’ is very important for your plugin to work accordingly. If you add and modify events frequently, then make sure that this field is set to a lower value. ‘Multiple Day Events’ will show the event on each day, rather than the first day only. The next option is used to set the display style. There are three styles available: Grid, List and Grouped List. And lastly, the ‘Clear Cache’ button could be used to clear the feed cache.

Customizing and Features

Google Calendar Events plugin comes with a number of shortcodes. You will find the shortcode of a specific feed in its settings page, under the name of ‘Feed Shortcode.’ You can display a feed on any post or page by using its shortcode.

The shortcode could be further customized too. For instance, you can change how the calendar will be displayed, maximum number of events to display, sort the events on ascending or descending order, show the title on popup boxes, etc. You will find more information about customizing the shortcodes here (http://wpdocs.philderksen.com/google-calendar-events/shortcode/).

Another interesting feature of the plugin is it comes with a widget. However, the widget won’t be visible until you add at least one feed to the list. Once you have added a feed, you will see a new widget titled ‘Google Calendar Events’ in the widgets list.

Add Google Calendar Gcal Widget
Gcal Widget (Appearance >> Widgets)

There are some options for customizing the appearance of the widget. If you have read the discussion on the plugin settings, then you will understand most of the widget options too. But if you are unsure, check out the official documentation here (http://wpdocs.philderksen.com/google-calendar-events/widget/).

If you have configured the plugin correctly, then your output should look like the following:

Add Google Calendar Gcal Completed Demo
Demo of how a Gcal calendar may look in your site

If your output does not look like this, or if you have any confusion about our discussion, please let me know. I will try to make things clear for you.

Share this post:

Leave a Comment

Your email address will not be published. Required fields are marked *

WPLearningLab