Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/sashmarin/juliepr-series-toc/releases/download/juliepr-series-toc%401.0.0/juliepr-series-toc-1.0.0.zipA lightweight WordPress plugin that renders a table of contents for the current post's second-level category series.
Author: Sergei Ashmarin (@sashmarin)
How it works
The dynamic juliepr-series-toc/series-toc block finds the post's series category: a category directly below a top-level category. It prefers the primary category when one is stored, then lists all published posts from that series (including child categories) in chronological order. The current post is shown as plain, labelled text; other posts link to their permalinks.
The block is available in the block inserter.
Requirements
- WordPress 6.5 or later
- PHP 7.2 or later
Installation
- Copy this directory to
wp-content/plugins/juliepr-series-toc/. - Activate Juliepr Series Table of Contents in Plugins.
- Insert Series Table of Contents from the block inserter, or add `` to a template or pattern.
The block produces no output when the current post has no matching series category or the series contains no published posts.
Development
This repository ships the built block assets in build/; they are required at runtime. After changing PHP, run php -l juliepr-series-toc.php in a PHP-enabled environment. Test the block on a post with a second-level category and verify its output in both the editor and the front end.
Translations
English is the source language. The bundled Russian translation uses WordPress's PHP .l10n.php format for PHP strings and JSON for the block editor; the PO file remains the editable source for translators.
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.