WordPress Plugin Overview
WordPress compatibility:
- Minimum PHP version 8.0
- Minimum WordPress version 5.7
Also requires:
- A Google Workspace user account
- A site hosted on Pantheon, or another host of your choice, that allows you to install plugins
Use the Pantheon Content Publisher WordPress plugin to publish content directly from Google Docs. For detailed usage instructions, see our WordPress Getting Started Tutorial.
Click Create new collection then provide a management token from your Content dashboard and select whether new content should be created as Posts or Pages.
Click Connect existing collection then provide your collection ID. Create an access token and paste it in, then click Continue. Follow instructions to complete your setup by configuring webhooks for this collection.
Once published, Google Docs content is stored in WordPress and should not be treated as directly editable (read-only).
If you wish to edit a page or post, do so in Google Docs - you can easily access the source for a given page or post by clicking the Edit in Google Docs link from the WordPress Admin Dashboard:
- Custom post types are not yet supported by the plugin, only posts or pages.
Metadata refers to page-level configurations for a given post or page, managed via the Google Docs add-on. Clicking Edit next to Page Metadata in the Google Docs add-on opens the following window:
Below are the default metadata fields managed by the Content Publisher Google Docs add-on, and a description of how WordPress uses them:
- Title - sets post_title for the given post in the wp_posts database table, rendered based on theme.
- Slug - sets post_name for the given post in the wp_posts database table, determines the URL.
- Description - sets post_excerpt for the given post in the wp_posts database table.
- Image - sets a post thumbnail, rendered based on theme.
- Tags - sets tags for the given post, works natively as a default WordPress taxonomy.
Additionally, WordPress sites should create the following as a custom metadata field:
- Name: Categories
- Type: Text
- Usage: sets categories for the given post, works natively as a default WordPress taxonomy.
For step by step instructions, see our WordPress Getting Started Tutorial.
When publishing new Posts in WordPress, the author field defaults to the lowest-ID administrator (ordered ASC), which is often user ID 1, but only if that user is an administrator.
If no administrators exist, the default falls back to 0 (no-author). This behavior can be overridden using the pcc_default_author_id filter.
Override the default author set by the plugin to a user with a specific login name (e.g., “content-publisher”):
add_filter('pcc_default_author_id', static function ($defaultId, $article) {
// Replace with preferred user (fallback to computed default if not found)
$user = get_user_by('login', 'content-publisher');
return $user ? (int) $user->ID : (int) $defaultId;
}, 10, 2);
Override the default author set by the plugin for every post, based on a custom metadata field (e.g., ‘Author Email’):
add_filter('pcc_default_author_id', function ($id, $article) {
// Match emails to WP users
if (!empty($article->metadata['Author Email'])) {
$user = get_user_by('email', $article->metadata['Author Email']);
if ($user) return (int) $user->ID;
}
return (int) $id;
}, 10, 2);
Yes! Please do. The shortcodes will not render in preview mode while publishing via the Google Docs add-on but once content is published to WordPress the shortcodes will work on the webpage as expected.
Nope, no extra configuration is needed. Content is published as either a post or a page, and is searchable using the default search mechanism offered natively by WordPress.
No, once this option has been configured (during plugin setup) it cannot be changed.