Overview
Web Stories integrates deeply with WordPress as a custom post type (web-story), providing native support for WordPress features like posts, taxonomies, and archives.
Custom Post Type
The Web Stories plugin registers a custom post type with the slugweb-story that appears in the WordPress admin menu.
Post Type Configuration
The story post type is defined inincludes/Story_Post_Type.php:
Story_Post_Type.php
Supported Features
Stories support the following WordPress features:- Core Features
- Custom Metadata
- Title - Used for
amp-story[title]attribute - Author - Standard WordPress author support
- Editor - Custom story editor interface
- Excerpt - Story description/summary
- Thumbnail - Used for poster images
- Revisions - Full revision history support
- Custom Fields - Meta data storage
URL Structure
Stories use the rewrite slugweb-stories by default:
- Pretty permalinks with custom slug
- No front base (
with_front => false) - RSS feeds for stories
Taxonomies
Stories support standard WordPress taxonomies and custom taxonomies. You can:- Assign categories to stories
- Add tags for organization
- Create custom taxonomies for story classification
- Filter stories by taxonomy in queries
Capabilities & Permissions
The plugin defines custom capabilities for granular permission control:edit_web-storyedit_web-storiespublish_web-storiesdelete_web-stories
Post States
Stories integrate with WordPress post states to show their status in the admin:Story_Post_Type.php
REST API Integration
Stories are fully exposed through the WordPress REST API:Admin Menu Icon
The plugin uses a custom SVG icon in the WordPress admin menu:Story_Post_Type.php
Cache Management
The plugin manages WordPress object cache for story post counts:Story_Post_Type.php
Filters & Hooks
The plugin provides WordPress filters and actions:Available Filters
web_stories_block_settings- Modify block configurationwidget_title- Filter widget titlesdisplay_post_states- Add custom post states
Available Actions
web_stories_story_published- Fires when a story is publishedweb_stories_story_updated- Fires when a story is updated
The Web Stories custom post type is excluded from WordPress search by default (
exclude_from_search => true).Next Steps
Gutenberg Blocks
Learn how to embed stories using blocks
Story Archives
Configure story archive pages