Private Google Calendars


This plugin can display multiple private (and public) Google calendars with a shortcode, Gutenberg block or as a widget.

See the webpage for more information.


  • Access to private (and public) calendars by using OAuth2 or an API key.
  • Adjustable caching – this can greatly improve the performance.
  • It uses the FullCalendar library to show the calendar and can be fully customized within the Gutenberg block, shorcode attributes and the widget settings.
  • Calendar filtering.


This plugin provides 1 block.

  • Private Google Calendars


  1. Upload the plugin files to the /wp-content/plugins/private-google-calendars directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->Private Google Calendars screen to configure the plugin
  4. See the Help tab in the settings screen for information about setting up the OAuth2 access and using the shortcode and/or widget.


Important notes for users who upgraded to 20200902 and experience differences

The 20200902 update makes it possible to display private and public Google calendars at the same time in the same widget, shortcode or Gutenberg block.
This update makes the plugin also more secure. Though tested thoroughly it can be possible you experience a difference. Here are some possible differences and ways to solve them.

  • Public calendar isn’t showing anymore: this can happen when you display a calendar that you also have added to your Google account but didn’t select in the plugin settings page.
    The solution is either remove the calendar from your Google account or select it in the settings.

How can I override the calendar look?

Create a child theme and enqueue a css file with a dependency on pgc for example:

wp_enqueue_style('fullcalendar-override', get_stylesheet_directory_uri() . '/fullcalendar-override.css', ['pgc']);

I get a ‘Token has been expired or revoked’ error

This usually means you don’t have a valid access or refresh token anymore. This can only be solved by manually revoke access on the Google Permissions page and remove all plugin data.

I get an ‘Error: redirect_uri_mismatch’ error when I want to authorize

This means that you didn’t add your current URL [YOURWEBSITE]/wp-admin/options-general.php?page=pgc to the authorized redirect URIs. See the website for more information.

W3 Total Cache

If you use W3 Total Cache and have minify JS enabled, make sure that you do one of the following:
Choose “Combine only” in the “Minify” settings.
Enter the following files in the “Never minify the following JS files” textbox: fullcalendar.min.js and locale-all.js. Make sure you add the full path to these files from the root of your installation, so if your WordPress website is located in the wordpress directory, this will be:



November 6, 2020
Powerful plugin, well written & useful. Keep up the good work!
June 30, 2020
Excellent implementation of for wordpress, with attention to gutenberg. Very rapid support response from the developer. Note to new users: google just changed their API authorization; to display public google calendars, use the private calendar setup instructions on the developer's website. See support thread for more information.
May 1, 2020
Thank you Michiel for this plugin. It works smoothly, has a lot of hidden potential under the hood, but also works straight out of the box. I can fully reccommend it for anything that ivolves showing your Google calendar in WordPress. Five Stars!
February 25, 2020
The strongest argument for using Google Calendar as an event source is its ease of use. Where other plugins have a clunky list-based event management system, with Google Calendar adding and managing events is a breeze. This plug in is the perfect integration of Google Calendar into WordPress. Instead of introducing obscure front-end markup with a predefined set of styles, PGC takes two proven components (Google Calendar and FullCalendar) and blends them together in a minimalist yet powerful package. The author has clearly put thought into the maintainability of their plugin. No wonder all the reviews are 5 stars!
Read all 17 reviews

Contributors & Developers

“Private Google Calendars” is open source software. The following people have contributed to this plugin.


“Private Google Calendars” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Private Google Calendars” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Fixed security bug where you could display unselected private calendars
  • Now possible to use private and public calendars at the same time
  • Changed logic of displaying all or none of private calendars: before this change no selection means ALL private calendars are displyed. Now you have to select the calendars you want to display.
    This change was necessary because it’s now possible to display private and public calendars at the same time.
  • These changes should not impact your current pages as long as you don’t edit them. If you experience changed behaviour of existing pages, please make sure to clear all caches.
  • Added new documentation at:


  • When accessing public calendars use OAUth client ID when API key is empty.


  • Possible to set unchecked calendars for filter.


  • Custom event colors are reflected.


  • Possible to set firstDay / (shortcode = first_day) option to + or –


  • Fix for links open in separate tab. Now target=_blank is injected into the A tags instead of adding an event listener.


  • Added data-calendarid attribute to each .fc-event so you can manipulate them.
  • Links in the event popups now always open in separate tab.


  • Set default of PGC_EVENTS_MAX_RESULTS to 250.
  • Make PGC_EVENTS_MAX_RESULTS configurable in wp-config.php.


  • Added ‘moment’ plugin so you can use date formatting strings.


  • Filter top default if true.


  • Place filter on top or bottom of calendar.


  • Loading and error element can be translated.
  • Better error message displayed.
  • Filter fixed position. Fixes scroll to top wghen clicking filter checkbox.


  • Updated all libraries like tippy, popper, fullCalendar and moment.


  • Added timezone and ISO datetime string to Google call


  • Removed “Z” from start and end (double)


  • Added UTC “Z” to start and end time and make end time next day 23:59:59 so it gets all events.


  • Fixed modal FullCalendar popup


  • Added translation files.


  • Prepare for translation.


  • Small bug fix: check for empty string when expecting array in get_option() call.


  • Use wp_remote_get and wp_remote_post instead of file_get_contents. Thanks to @maikewng for his help in understanding the problem.


  • Bug fixed: when start and end time of event are the same, the event.end is null. Now I use the event.start in that case.


  • Bug when submitting settings where file select input was not correctly checked, now this check is disabled because we can also have public calendars.
  • Added a Plugin settings link to the plugin page.


  • You can now specify title and color for public calendars.
  • Bug in widget fixed: when no private calendar was selected in settings, all private calendars were displayed in the widget form.


  • Adding referer to public calendar calls to handle restrictions on API key.


  • Now also access to public calendars with an API key instead of more difficult to setup OAuth2
  • Small layout changes


  • Gutenberg block implemented (you can use this instead of the shortcode)


  • Hidepassed and hidefuture accept number of days as well
  • Loading spinner active after timeout, so it’s not visible immediately


  • Moment timezone plugin – you can now set the timezone for each calendar; by default local times are displayed


  • Show popup also for weeklist


  • Popups can be dragged


  • Bugfix


  • Bugfix


  • Added version query parameters to enqueued styles and scripts for caching purposes
  • Make creator, location, attendees and attachments, calendarname available for events
  • CSS classes added to popup to make override style possible


  • Bug: cast attributes from shortcode to int or boolean
  • Add CSS classes to time, title, description and link of event in popup
  • Removed title attribute from event


  • Now also possible to display public calendars like national holidays


  • New option: eventlink
  • Changed option: eventpopup
  • Tippyjs theme change
  • Font size changes


  • You can now hide passed or future events


  • Title and button text change


  • No borders around events
  • Remove small font size header and button text


  • Timegrid week working
  • Bug fixed: using same cache for multiple calendars with different calendar selections
  • CSS overrides for WP
  • Mobile responsive toolbar


  • Tippy tooltips (
  • WP CSS override for specific fullCalendar


  • Now possible to specify specific calendars in the shortcode, so it’s now possible to show different calendars on different sections of your website.
  • FullCalendar update to v4.


  • Possible to override calendar color with fullCalendar eventColor or eventBackgroundColor properties


  • Fullcalendar locales check


  • Make working with PHP 5.4 as in requirements: Arrays are not allowed in class constants.
  • Rewrite empty() calls on methods to make it work with PHP 5.4
  • You can now sub-select calendars per widget, so you can add multiple calendars
    as a widget, where each widget displays a different calendar.


  • Updated fullcalendar to 3.9.0
  • Tested with WordPress 5.0.2
  • Fixed path for fullcalendar.print.min.css
  • Removed moment.js file, because we use the WordPress one


  • First release