Do you want to add a Google Calendar to your WordPress site?
If you use Google Calendar to manage your business’s public events and schedule, then you may want to embed it on your website. This way, you won’t have to create a new calendar from scratch, and every event you add will be automatically displayed.
In this article, we will show you how to add a Google Calendar in WordPress, step by step.
Why Add Google Calendar to WordPress?
If you use Google Calendar to schedule your public events, then you may want to display it right on your website for your visitors to see. Whenever you add a new event, the calendar will update itself and immediately show the new event to your users.
Here’s one example of when adding a Google Calendar can be useful. 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.
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.
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.
You can also use Google Calendar to schedule virtual events like webinars and online sermons. In the event description, you can add a link to the conference call (if the event is free), allowing visitors to easily attend the event.
That being said, let’s see how to add a Google Calendar to your WordPress website. You can use the quick links below to navigate through this article:
Step 1: Install a Google Calendar 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.
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.
Here, you will need to enter a Google API key, which you will do in the next step.
Step 2: Create a Google API Key
To create the Google API 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.’
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.’
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.
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.’
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.’
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.
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.
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.
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.
Now, scroll to ‘Application Restrictions’ and then click on ‘Websites.’
Under ‘Website Restrictions,’ you need to click on ‘Add.’
In the ‘Add Website’ field, type in your website’s address.
Then, click on ‘Done.’
Under ‘API restrictions,’ you need to select the button next to ‘Restrict key.’
With that done, just click on the ‘Select APIs’ dropdown menu.
In the dropdown, check the box next to ‘Google Calendar APIs.’
Then, simply click on ‘OK.’
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.
With that done, click on ‘Save Changes’ to store the API key.
Step 3: 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.
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.
Now, you need to find the ‘Access permissions for events.’
Under this heading, simply check the box next to ‘Make available to 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.’
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.
Step 4: Display Your Google Calendar on Your WordPress Site
With that done, you are ready to add the Google Calendar to your WordPress blog or website using a shortcode.
Method 1: Add Your Google Calendar to a Page or Post
Simply go to the page or post where you want to show the calendar, and then click on the ‘+ Add Block’ button.
In the popup, just type in ‘Shortcode’ and then click on the right block when it appears.
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. Here’s what ours looks like:
Method 2: Add Your Google Calendar to a Sidebar
Sometimes, you may want to promote your events across every page of your WordPress website. To do this, simply add the shortcode to any widget-ready area.
This allows visitors to see the calendar and learn about your events from any page of your WordPress website.
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.
In the search field that appears, type in ‘Shortcode.’
When the right block shows up, simply click to add it to the 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.
To get started, head over to Appearance » Editor in the WordPress dashboard.
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.
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.
Finally, click on the ‘Save’ button to make the calendar live.
Bonus Tip: Add an Event or Appointment Booking Form
Now that you’ve added a Google Calendar to WordPress, you should consider allowing visitors to book an event right from your website.
The easiest way to do this is with a form plugin like WPForms. This WordPress form builder makes it easy to create simple and user-friendly booking forms, so users will have no problem completing them.
What’s great about WPForms is it has 1300+ pre-made templates to choose from. This means that you can create a booking form for virtually any type of site.
To learn more about WPForms, you can read our in-depth WPForms review. Also, see WPForms in action in these guides:
- How to Add Google Calendar Events From Your WordPress Contact Form
- How to Create an Event Registration Page in WordPress
- How to Create a Booking Form in WordPress
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.