Skip to main content

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​

RuleDetail
Max depth3 levels (Top → Topic → Sub Topic)
Auto-flatteningTerms deeper than Sub Topic are reattached one level higher
Non-publicOnly accessible via admin screens
HierarchicalYes (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.

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.

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-current class
  • Current branch expanded with .is-current-branch class
  • "Keep open" toggle (persisted via localStorage)
  • Close button and backdrop click-to-close

Post Ordering Priority​

  1. Drag-and-drop order from the admin ordering screen
  2. Manual order (numeric _wpst_authority_order post meta)
  3. 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 post post 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​

FieldValue
Display nameWPW Authority Contents Sidebars
Directory slugwpstrategist-authority-contents-sidebars
Entry filewpstrategist-authority-contents-sidebars.php
Version0.2.1

Option 1: Upload in WordPress admin​

  1. Zip the plugin folder as wpstrategist-authority-contents-sidebars.zip.
  2. Go to Plugins > Add New > Upload Plugin.
  3. Upload, install, then Activate.

Option 2: Manual copy​

  1. Copy the folder to wp-content/plugins/wpstrategist-authority-contents-sidebars/.

  2. 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​

  1. Plugins lists WPW Authority Contents Sidebars as active.
  2. Posts > Authority Topics exists.
  3. Posts > Authority Sidebars exists.
  4. 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"
warning

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.