WPW Authority Contents Sidebars
Overview
Version 0.2.1 by wpwhite.com. Creates a hierarchical authority content taxonomy (wpst_authority_topic) and renders a frontend sidebar panel on single posts showing the reader's position in the authority structure.
Architecture
Custom Taxonomy (wpst_authority_topic)
→ Top Level (Domain): "Linux", "DevOps", "CLI"
→ Topic: "Server Setup", "Docker", "Bash Scripting"
→ Sub Topic: "Ubuntu", "Docker Compose", "String Manipulation"
→ Posts assigned to any level
Taxonomy Rules
| Rule | Detail |
|---|---|
| Max depth | 3 levels (Top → Topic → Sub Topic) |
| Auto-flattening | Terms deeper than Sub Topic are reattached one level higher |
| Non-public | Only accessible via admin screens |
| Hierarchical | Yes (hierarchical => true) |
Admin Interface
1. Post Editor Metabox (Side)
Every post gets a "Authority Sidebar" metabox with:
- Structure Placement: Hierarchical dropdown of authority terms
- Resolved Path: Read-only breadcrumb showing the term's full path
- Manual Order: Numeric fallback ordering
- Editorial Notes: Internal notes (not shown on frontend)
- Frontend Icon Preview: Shows whether the icon will display
2. Authority Sidebar Order Screen
A dedicated admin screen under Posts > Authority Sidebars with:
- Filter by top-level topic
- Drag-and-drop sorting of posts within each branch
- Statistics (top levels, topics, subtopics, posts)
- Save/Load filter presets
Branch order is stored as a site option (wpst_authority_sidebar_order) in the format:
['term_123' => [45, 62, 13, ...], 'term_456' => [...]]
3. Admin Notices
- Depth violation warning shown on taxonomy screen
- Help text on term add/edit forms explaining hierarchy rules
Frontend Rendering
The frontend navigation and horizontally scrollable article tables use the Opshell documentation palette: dark surfaces, subtle borders, muted scrollbar thumbs, and clear hover feedback. Scrollbars remain native and usable without competing with the content.
Menu Icon
A toggle button appears in the GeneratePress menu bar (via generate_menu_bar_items hook at priority 61) on single posts with an assigned authority term.
Icon: SVG document icon with nested structure lines.
Sidebar Panel
When activated, a slide-out panel renders:
- Top-level branch name with "Authority Structure" label
- Hierarchical tree with collapsible topic/subtopic sections
- Current post highlighted with
.is-currentclass - Current branch expanded with
.is-current-branchclass - "Keep open" toggle (persisted via
localStorage) - Close button and backdrop click-to-close
Post Ordering Priority
- Drag-and-drop order from the admin ordering screen
- Manual order (numeric
_wpst_authority_orderpost meta) - Alphabetical by title (fallback)
Conditional Loading
Frontend assets only load when:
- Not admin
- Is a single post (
is_singular('post')) - Post status is
publish - Post has an assigned authority term
Installation
Requirements
- WordPress with the standard
postpost type. - GeneratePress is recommended for the native menu-bar integration; the current build also renders a floating pill toggle, so the panel still works without a theme-specific hook.
Plugin identity
| Field | Value |
|---|---|
| Display name | WPW Authority Contents Sidebars |
| Directory slug | wpstrategist-authority-contents-sidebars |
| Entry file | wpstrategist-authority-contents-sidebars.php |
| Version | 0.2.1 |
Option 1: Upload in WordPress admin
- Zip the plugin folder as
wpstrategist-authority-contents-sidebars.zip. - Go to Plugins > Add New > Upload Plugin.
- Upload, install, then Activate.
Option 2: Manual copy
-
Copy the folder to
wp-content/plugins/wpstrategist-authority-contents-sidebars/. -
Activate it via Plugins or WP-CLI:
SITE="/home/wp_opshell_dev/sites/opshell.dev"wp plugin activate wpstrategist-authority-contents-sidebars --path="$SITE"
Live path on opshell.dev (host alias GC-SG-M8):
/home/wp_opshell_dev/sites/opshell.dev/wp-content/plugins/wpstrategist-authority-contents-sidebars
Deploy only the runtime files plus README.md; exclude other .md docs and .git.
The plugin can stay active while files are updated.
Activation checklist
- Plugins lists
WPW Authority Contents Sidebarsas active. - Posts > Authority Topics exists.
- Posts > Authority Sidebars exists.
- The Authority Sidebar metabox appears in the post editor sidebar.
Usage
1. Create the topic structure
Go to Posts > Authority Topics and build one global map:
- top-level term = business domain (for example
SEO) - child term = topic (for example
Technical SEO) - grandchild term = sub topic (for example
Internal Linking)
Empty terms remain editable in admin but are hidden on the frontend until they contain a published post. Any nesting deeper than sub topic is flattened back to the nearest allowed level automatically.
2. Assign posts
Open a post and use the Authority Sidebar metabox:
- Structure Placement - choose a top level topic, topic, or sub topic. Any selection enables the frontend toggle.
- Manual Order - numeric fallback used when the branch has not been curated.
- Editorial Notes - internal only, never rendered.
With no authority term assigned, the toggle is hidden and the post is not listed in the panel.
3. Curate branch order
Go to Posts > Authority Sidebars:
- filter by top-level topic or by a specific topic/sub-topic branch
- drag posts to set reading order within a branch
- click Save Structure Order (merges into the stored option, preserving other branches)
Frontend ordering priority is: curated branch order, then _wpst_authority_order,
then alphabetical by title.
4. Frontend behavior
On a qualifying single post the authority toggle opens a right-side panel that:
- shows only the current post's top-level branch
- renders collapsible topic/sub-topic sections
- highlights the active path and current post
- offers Keep open on desktop to keep the panel docked across authority posts (and shift the sticky Greenshift TOC left)
Keep open is disabled on mobile by design.
Example structure
SEO
├── Technical SEO
│ ├── Demo SEO: Technical SEO Foundations
│ └── Internal Linking
│ └── Demo SEO: Internal Linking Strategy
└── Topical Authority
└── Demo SEO: Topical Authority Writing Plan
WordPress Performance
└── Core Web Vitals
├── Demo Performance: Core Web Vitals Checklist
├── Demo Performance: Page Speed Audit Routine
└── Image Optimization
└── Demo Performance: Image Optimization Workflow
WP-CLI quick reference
SITE="/home/wp_opshell_dev/sites/opshell.dev"
TAX="wpst_authority_topic"
wp term list "$TAX" --fields=term_id,name,parent,count --format=csv --path="$SITE"
wp term create "$TAX" "Internal Linking" --parent=43 --path="$SITE"
wp post term set 9408 "$TAX" 44 --by=id --path="$SITE"
wp post term list 9408 "$TAX" --path="$SITE"
wp post term set resolves the term argument by slug by default. Always pass
--by=id when assigning a numeric term ID, or WP-CLI creates a stray term named
after that number.