WWJ ZD Guide
Plugin that syncs Zendesk Help Center articles to WordPress
by Jamie Smith · github.com/worldwidejamie/zd-guide · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/worldwidejamie/zd-guide/archive/refs/heads/main.zipWWJ ZD Guide Plugin
A modern WordPress plugin that integrates Zendesk Guide articles into WordPress as custom posts with hierarchical taxonomy organization.
Features
- 🔄 Sync Zendesk Guide articles, sections, and categories
- 📦 Custom post type for articles with full block editor support
- 🏷️ Hierarchical taxonomies for categories and sections
- 🎨 Modern Gutenberg block for displaying article snippets
- 🔐 Secure API credential management
Requirements
- WordPress 6.8 or higher
- PHP 8.0 or higher
- Node.js 18 or higher (for development)
Installation
- Clone this repository into your WordPress plugins directory
- Run
pnpm installto install dependencies - Run
pnpm buildto compile assets - You can also run
pnpm startfor development with hot reloading - Activate the plugin through WordPress admin
Development
Setup
# Install dependencies
npm install
# Start development mode with hot reload
npm start
# Build for production
npm run build
Code Quality
# Run PHP Code Sniffer
npm run phpcs
# Fix PHP code style issues
npm run phpcbf
# Run PHPUnit tests
npm run test
# Lint JavaScript
npm run lint:js
# Lint CSS
npm run lint:css
Project Structure
zd-guide/
├── src/ # Source files
│ └── blocks/ # Block development
│ └── article/ # Article block
│ ├── block.json # Block configuration
│ ├── edit.js # Editor component
│ ├── save.js # Save component
│ ├── render.php # Server-side render
│ └── style.scss # Block styles
├── includes/ # PHP classes
│ ├── Admin/ # Admin functionality
│ ├── API/ # API client
│ ├── PostTypes/ # Custom post types
│ ├── Taxonomies/ # Custom taxonomies
│ ├── Sync/ # Sync handlers
│ └── Plugin.php # Main plugin class
├── build/ # Compiled assets (auto-generated)
├── assets/ # Static assets
├── languages/ # Translation files
└── tests/ # PHPUnit tests
Architecture
Modern WordPress Development
This plugin follows WordPress 6.8+ best practices:
- Block Development: Uses
@wordpress/scriptswith JSX andblock.json - PHP 8.0+: Typed properties, return types, and modern patterns
- OOP Architecture: Namespaced classes with PSR-4 autoloading
- REST API: Leverages WordPress core data for block editor integration
- No Custom Webpack: Relies on
@wordpress/scriptsdefaults
Data Flow
- Categories synced first (creates
zd_categoryterms) - Sections synced per category (creates
zd_sectionterms with parent relationships) - Articles synced per section (creates
zd_articleposts with taxonomy assignments)
Key Classes
WwjZdguide\Plugin: Main plugin orchestrator (singleton pattern)WwjZdguide\Admin\Settings: Admin settings page and credential managementWwjZdguide\API\Zendesk_Client: Zendesk API communicationWwjZdguide\Sync\Sync_Handler: Data synchronization logicWwjZdguide\PostTypes\Article: Article post type registrationWwjZdguide\Taxonomies\Category: Category taxonomyWwjZdguide\Taxonomies\Section: Section taxonomy
Usage
Configuration
-
Navigate to Settings > Zendesk Guide in WordPress admin
-
Enter your Zendesk credentials:
- Subdomain (e.g., "yourcompany" from yourcompany.zendesk.com)
- Admin email address
- API token
- You will need an API token which can be created through your Zendesk settings here.
-
Click Test Connection to verify credentials
Syncing Content
- Click Sync Categories to import categories from Zendesk
- Click Sync Sections to import sections (requires categories)
- Click Sync Articles to import articles (requires sections)
Using the Block
- In the block editor, add the Zendesk Article block
- Select an article from the block settings sidebar
- Configure display options (show excerpt, show meta)
- The block renders server-side for optimal performance
API Integration
Zendesk API Endpoints
- Categories:
https://{subdomain}.zendesk.com/api/v2/help_center/categories.json - Sections:
https://{subdomain}.zendesk.com/api/v2/help_center/categories/{id}/sections.json - Articles:
https://{subdomain}.zendesk.com/api/v2/help_center/sections/{id}/articles.json
Authentication
Uses Basic Auth with email/token combination:
Authorization: Basic base64(email/token:api_token)
Contributing
- Follow WordPress Coding Standards
- Use modern PHP 8.0+ syntax
- Write PHPUnit tests for new features
- Use
@wordpress/scriptsfor JavaScript - Document all functions and classes
License
GPL-3.0-or-later
Support
For issues and questions, please use the GitHub issue tracker.
Project Notes
This is my first open source project! Always open to suggestions or advice for improvement. Additionally, your patience is appreciated.
How do I configure the plugin?
You will need an API token which can be created through your Zendesk settings.
Instructions can be found here.