Do you want to add a Google Calendar in your WordPress site?

Google Calendar makes it easy to promote in-person and virtual events to the people who visit your website. This can help you get more attendees and create a buzz around your upcoming events.

In this article, we will show you how to add a Google Calendar in WordPress, step by step.

How to add a Google Calendar in WordPress (Step by step)

Why Add Google Calendar to WordPress?

By adding Google Calendar to WordPress, you can easily show upcoming events to your visitors in a professional and user-friendly calendar layout.

These might be virtual events like webinars and online sermons or in-person events.

For example, if you run a gym website, then you might add all your fitness classes, free trials, coaching sessions, and other fitness events to the calendar.

An example of an events calendar

When creating an event, you can add all the information visitors need to know.

This might include anything attendees need to bring to the event, whether refreshments are provided, the price, and directions to the venue.

An example of a Google Calendar events

This will help visitors decide whether the event is right for them without having to ask a ton of questions via your site’s contact form. If you make any changes to your Google Calendar, then your website will update automatically, so you’ll also save a ton of time.

That being said, let’s see how to add a Google Calendar to your WordPress website.

Adding Google Calendar in WordPress Using a Plugin

The best way to add a calendar to your WordPress website is by using the Pretty Google Calendar plugin. It is one of the best WordPress calendar plugins and allows you to show events from a public calendar in a mobile-responsive layout.

This means the calendar will look just as good on smartphones and tablets as it does on desktop devices.

Embedding a Google Calendar in a WordPress website

The first thing you need to do is install and activate the Pretty Google Calendar plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, go to Settings » Pretty Google Calendar Settings.

The Pretty Google Calendar WordPress plugin

Here, you’ll need to enter a Google API key.

To create this key, head over to the Google Cloud Console. If this is your first time visiting the console, then you’ll need to accept the terms and conditions and choose whether you want to get email updates.

With that done, click on ‘Agree and Continue.’

The Google Cloud Console

This takes you to the Google Cloud Console.

We’re going to create a new project for our Google Calendar API, so click on ‘Select a project.’

Creating a new project in the Google Cloud Console

In the popup that appears, select ‘New Project.’

You can now type in a name for the project. This is just for your reference, so you can use anything you want.

On this screen, you can also add an optional organization to the API key and change the location where Google Cloud Console will create your project.

Creating a Google Calendar API key for WordPress

When you are happy with the information you’ve entered, click on ‘Create.’

After that, select ‘Enabled APIs & Services’ from the left-hand menu and then click on ‘Enable APIs and Services.’

Enabling the Google Calendar API

This screen shows all the different APIs you can enable. For example, if you want to show the latest videos from your YouTube channel, then you’ll need to enable the YouTube Data API.

Since we want to add a Google Calendar in WordPress, scroll to the ‘Google Workspace’ section and click on ‘Google Calendar API.’

Enabling the Google Calendar API

This takes you to a screen where you can activate the key for managing and changing events in the Google Calendar.

To do this, simply click on the ‘Enable’ button.

Activating the Google Calendar API

With that done, you are ready to create a Google Calendar API key.

In the left-hand menu, click on ‘Credentials’ and then select ‘Create Credentials.’ In the dropdown that appears, you need to click on the ‘API key’ option.

Creating credentials in the Google Cloud Console

After a few moments, you’ll see an ‘API key created’ popup. You’ll need to add this information to the plugin, so make a note of it.

By default, the Google Calendar API key is unrestricted. To stop other people from using the API key, it’s smart to restrict it by clicking the ‘Edit API Key’ link inside the popup.

Creating a Google Calendar API key for your WordPress website

This opens a screen showing all your Google API keys. Simply find the key you just created and give it a click.

If you closed the popup by accident, then don’t worry. You can simply select ‘Credentials’ in the left-hand menu and then select the API key you created in the previous step.

Restricting access to the Google Calendar API key

Now, scroll to ‘Application Restrictions’ and then click on ‘Websites.’

Under ‘Website Restrictions,’ you need to click on ‘Add.’

Restricting access to the Google Maps API key

In the ‘Add Website’ field, type in your website’s address.

Then, click on ‘Done.’

Restricting a Google Maps API key

Under ‘API restrictions,’ you need to select the button next to ‘Restrict key.’

With that done, just click on the ‘Select APIs’ dropdown menu.

Restricting access to a Google API key

In the dropdown, check the box next to ‘Google Cloud APIs.’

Then, simply click on ‘OK.’

Restricting access to the Google API credentials

With that done, click on ‘Save’ to store your settings.

You are now ready to add the Google Calendar API key to your WordPress website. Switch back to the WordPress dashboard and add the API key to the ‘Google API’ field.

Adding a Google API key to your WordPress website

With that done, click on ‘Save Changes’ to store the API key.

How to Make Your Google Calendar Public

Before you can add a Google Calendar in WordPress, you’ll need to change the calendar’s settings to make it public. You also need to get the calendar ID.

To do that, open the Google Calendar that you want to add to your WordPress website. Then, click the ‘Gear’ icon and select ‘Settings’ from the dropdown menu.

The Google Calendar settings

In the left-hand menu, find the ‘Settings for my calendars’ section.

Here, click on the name of the calendar that you want to share. This will open up the settings for that specific calendar.

Changing the calendar settings in Google Drive

Now, you need to find the ‘Access permissions for events.’

Under this heading, simply check the box next to ‘Make available to public.’

Making a Google Calendar public

A popup will warn you that these events will be visible to other people and may even appear in the Google search results.

If you are happy to go ahead, then click on ‘OK.’

How to make a Google Calendar public

With that done, scroll to the ‘Integrate calendar’ section and find the ‘Calendar ID.’

You’ll need to use this value in your shortcode, so either make a note of it or leave this screen open in a separate tab.

Getting a Google Calendar ID

Adding Your Google Calendar to WordPress

With that done, you are ready to add the Google Calendar to your WordPress blog or website using a shortcode. Simply go to the page or post where you want to show the calendar, and then click on the ‘+’ button.

In the popup, just type in ‘Shortcode’ and then click on the right block when it appears.

Adding a Google Calendar to WordPress using shortcode

Inside the shortcode block, add the following shortcode:

[pretty_google_calendar gcal= “calendar-id”]

You’ll need to replace “calendar-id” with the ID you got in the previous section.

With that done, you can add any other content to the page, such as images, text, and categories and tags. When you are ready to make the calendar live, click on the ‘Publish’ or ‘Update’ button.

Now if you visit your website, you’ll see the Google Calendar in action.

Adding Your Google Calendar to a WordPress Sidebar

Sometimes you may want to promote your events across every page of your WordPress website. To do this, simply add the Google Calendar to any widget-ready area.

This allows visitors to see the calendar and learn about your events from any page of your WordPress website.

A Google Calendar, embedded in a WordPress sidebar

To add the Google Calendar to a sidebar or similar section, go to Appearance » Widgets in the left-hand menu.

You can now click on the blue ‘+’ icon.

Adding a calendar to your WordPress website

In the search field that appears, type in ‘Shortcode.’

When the right block shows up, simply click to add it to the sidebar.

Adding a shortblock block to the WordPress sidebar

You can also drag the Shortcode block to the area where you want to show the calendar.

After that, paste the Pretty Google Calendar shortcode and calendar ID into the block. You can get this information by following the same process described above.

Finally, go ahead and click on the ‘Update’ button. When you visit your WordPress website, you’ll see the Google Calendar live.

If you are using one of the newer block-enabled themes, then you’ll need to add the widget using the full site editor.

To get started, head over to Appearance » Editor in the WordPress dashboard.

Opening the WordPress full-site editor (FSE)

In the left-hand menu, choose the template or template part that you want to edit.

For example, you might add the calendar to your site’s sidebar or similar section.

Editing a WordPress full-site editor template

After choosing a template or template part, you can add a shortcode block by following the same process described above.

With that done, add the shortcode and ID for the calendar you want to show.

Adding a Google Calendar to WordPress using the full-site editor

Finally, click on the ‘Save’ button to make the calendar live.

We hope this article helped you learn how to add Google Calendar in WordPress. You may also want to see our expert picks for the best email marketing services for small businesses or our guide on how to create a contact form in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.