Post Chapters
Split long WordPress posts into chapters: each chapter gets its own URL, title and canonical, with an automatic table of contents and navigation. Block and classic editors; works with Yoast SEO, Rank Math, SEOPress, AIOSEO and The SEO Framework. Formerly Multipage (sgr-nextpage-titles). WP 6.3+ / PHP 7.4+.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/paulargoud/post-chapters/archive/refs/heads/main.zipPost Chapters for WordPress
Split your long WordPress posts into chapters, each on its own page with its own title, and add an automatic table of contents.
Post Chapters is the continuation of Multipage (sgr-nextpage-titles), originally created by Sergio De Falco. It keeps the content, the settings and the shortcode of Multipage: see Coming from Multipage.
Features
- Chapter block for the block editor (works in the iframed editor; posts saved by Multipage stay valid). A heading or a core page break turns into a chapter, and a chapter into a heading, with the block switcher
- Chapters panel in the editor sidebar: the chapters of the post (click to go to one) and a button that turns every H2, H3 or H4 heading at the top level of the post into a chapter, in one undoable step
[nextpage title="..."]shortcode for the classic editor, with a Chapter button in the Visual editor (TinyMCE), the Text editor (Quicktags) and the Classic block- Reliable splitting: blocks, shortcodes and core page breaks can be mixed; every chapter is valid, balanced HTML, even when a shortcode sits inside a paragraph or a heading
- Table of contents with configurable position, labels, header visibility and an optional comments link
- Navigation: "Continue / Back to" or "Previous / Next" links between chapters
- Comments on all chapters, the first one or the last one, in classic and block themes
- SEO-friendly: chapter titles in
<title>,rel=prev/rel=nextlinks, integrations with Yoast SEO, Rank Math, SEOPress, All in One SEO and The SEO Framework (chapter title in every title, canonical and Open Graph URL of each chapter, indexable chapters) - Block and classic themes: the table of contents and the navigation are added once, only to the post being viewed (never to excerpts, related posts or Query Loop blocks)
- Fast: the next chapter is prefetched when the reader hovers a navigation or table of contents link (WordPress 6.8+, visitors who are not logged in), the stylesheet is printed inline, and on posts without chapters the plugin only looks for a chapter marker, and it parses split posts once, keeping the result in the object cache (tested with Redis)
- Custom CSS: override the plugin styles from your theme
- RTL support (frontend and admin)
- Internationalized: French, German, Italian and Spanish included
- Chapter index tools: a "Rebuild chapter index" button and the
wp post-chaptersWP-CLI commands
Requirements
| Requirement | Minimum | Tested up to |
|---|---|---|
| WordPress | 6.3 | 7.1.4 |
| PHP | 7.4 | 8.4 |
Compatibility
Tested on WordPress 7.1.4 with Twenty Twenty-Five, with the plugins below on 2026-11-09. Each SEO plugin is installed from WordPress.org and checked by bin/check-seo.sh, which runs before a release.
| Plugin | Tested version | What Post Chapters does with it |
|---|---|---|
| Yoast SEO | 28.8 | Chapter title in the title and the social titles, canonical, og:url and schema url of each chapter |
| Rank Math SEO | 1.0.281 | Chapter title in the title (even with the default title template) and the social titles |
| SEOPress | 10.4 | Chapter title in the titles, canonical of each chapter |
| All in One SEO | 5.0.5 | Chapter title instead of "Page N"; chapters keep the robots of their post instead of AIOSEO's default noindex for paginated pages |
| The SEO Framework | 5.2.0 | Chapter title instead of "Page N" in the title and the social titles |
| Redis Object Cache | 3.0.0, Redis 7 | Parsed chapters are cached in the object cache; settings and edited content are seen on the next request. The test suite also runs on it in CI |
| Elementor | 4.4.0 | Posts written in the block or classic editor and shown with Elementor's Canvas or Full Width templates are split as usual. A post built with the Elementor editor is not split: Elementor renders the whole post on every page, which would make the chapters copies of each other, so the plugin steps aside |
| WordPress core sitemap | 7.1.4 | wp-sitemap.xml works as before; it lists the post, not its chapters |
| Custom post types | Flat and hierarchical types, with their own URL base or plain permalinks (covered by the test suite) |
With every SEO plugin, a chapter gets its own title, canonical URL and Open Graph URL, a single pair of rel=prev / rel=next links, and is not set to noindex because it is "paginated". Page builders replace the content of the posts they build, so chapters need the content of the post itself (block editor, classic editor). Posts built with Divi (_et_pb_use_builder), Beaver Builder (_fl_builder_enabled) and Bricks (_bricks_editor_mode) are recognized by their post meta and left alone like Elementor's, but these three are not tested. Also not tested: Elementor Pro theme templates and e-commerce templates that render the post content themselves. The pchap_is_builder_post filter changes which posts are left alone. Plugins change: if one of the tested versions misbehaves, open an issue.
Installation
- Download
post-chapters.zipfrom the latest release (use this archive, not GitHub's "Source code" archives, which contain the development files and a differently named folder) - In WordPress, go to Plugins > Add New > Upload Plugin and upload the zip, or unzip it so that the plugin sits in
/wp-content/plugins/post-chapters/ - Activate Post Chapters through the Plugins menu
- Configure it under Settings > Post Chapters
Post Chapters is not on WordPress.org yet. Its header declares Update URI: https://github.com/PaulArgoud/post-chapters, so WordPress never replaces it with a plugin of the same slug from WordPress.org. To update, download the new zip and upload it again (WordPress offers to replace the installed version).
Coming from Multipage
Post Chapters reads the same content and settings as Multipage (1.5.12 from WordPress.org, or the 1.5.13 to 1.7.1 releases of this repository): the [nextpage] shortcodes, the Subpage blocks (multipage/subpage), the options and the subpage index (_mpp_data) are reused as they are.
- Install and activate Post Chapters. While Multipage is active, Post Chapters stays idle and shows a notice
- Deactivate Multipage. Post Chapters takes over on the next page load and moves a pending index rebuild to its own background task
- Remove Multipage by deleting its folder (
wp-content/plugins/sgr-nextpage-titles/) over FTP or SSH. Do not use Delete on the Plugins screen: Multipage 1.5.15 and later then run their uninstall routine, which erases the settings and the index that Post Chapters uses
What changes for visitors and editors:
- The block is called Chapter in the inserter (still
multipage/subpagein the content), and the editor buttons say Chapter - An untitled page is titled "Chapter N" instead of "Page N", and the "page #" row labels of the table of contents read "Chapter #"
- The settings pages moved to Settings > Post Chapters (
options-general.php?page=post-chapters) - The
wp multipageWP-CLI command is nowwp post-chapters(wp multipagestill works)
What changes for developers (see the changelog):
- Functions, classes and constants use the
pchapprefix:mpp_toc()ispchap_toc(),MultipageisPChap,multipage()ispchap(),MPP_VERSIONisPCHAP_VERSION. The old names are gone (they would collide with Multipage) - Hooks use the
pchap_prefix. Callbacks attached to the oldmpp_*names still run, as deprecated hooks - Text domain
post-chapters; theme stylesheetcss/post-chapters.css(css/multipage.cssstill works)
Usage
Block editor
Add a Chapter block where a new chapter starts and type its title. Press Enter at the end of the title to continue writing below it.
To split a post that already has headings, open the Chapters panel in the document sidebar, choose the heading level and click Turn N headings into chapters. Each heading becomes a chapter where it stands; one undo brings the headings back. Only the headings at the top level of the post are turned (not those inside a group or columns).
Classic editor
Use the Chapter button of the toolbar, or insert the shortcode anywhere in your post content:
[nextpage title="My chapter title"]
An optional slug attribute sets the chapter slug: [nextpage title="My chapter title" slug="my-slug"].
The content before the first chapter becomes the intro page (titled "Intro", translated). A chapter without a title is titled "Chapter N".
Settings
Navigate to Settings > Post Chapters to configure:
| Setting | Description |
|---|---|
| Intro | Hide the title of the automatic intro page |
| Display comments on | All pages, the first page only, or the last page only |
| Navigation type | "Continue or back to intro", "Next and previous", or hidden |
| Disable the standard pagination | Hide the WordPress page numbers (wp_link_pages()) |
| Table of contents | Only on the first page, position (top left, top right, top, bottom, hidden), row labels, header visibility |
| Comments link | Add a link to the comments inside the table of contents |
The Advanced tab holds the title and content rewrite priorities, the option to disable the TinyMCE Chapter button, and the Rebuild chapter index action.
Custom CSS
Post Chapters loads a minimal stylesheet on split posts only. To override it, add one of these files to your theme:
css/post-chapters.min.css(orcss/post-chapters.csswhenSCRIPT_DEBUGis enabled)css/post-chapters-rtl.min.css/css/post-chapters-rtl.cssfor RTL languages
The plugin checks the child theme first, then the parent theme, then falls back to its own styles. In each theme, the css/multipage*.css names of Multipage are still recognized. The HTML classes (.mpp-toc-container, .mpp-post-navigation...) did not change.
Filters & Hooks
| Filter | Description |
|---|---|
pchap_the_content |
Modify the content output (title + table of contents + content) |
pchap_page_title_template |
Change the chapter title HTML template (default: <h2>%s</h2>) |
pchap_link_pages / pchap_link_pages_args / pchap_link_pages_link |
Navigation HTML, arguments and individual links |
pchap_toc / pchap_toc_args / pchap_toc_pages_row |
Table of contents HTML, arguments and individual rows |
pchap_untitled_subpage_title |
Fallback title of untitled chapters (default: "Chapter N") |
pchap_subpage_title_allowed_html |
Inline HTML allowed in chapter titles |
pchap_comment_block_names |
Comment blocks hidden on chapters without comments (block themes) |
pchap_speculation_rule / pchap_speculation_mode |
The rule that prefetches the chapter links on hover (WordPress 6.8+): change it, switch to prerender, or return an empty value to turn it off |
pchap_seo_integrations |
Add an SEO plugin integration |
pchap_get_admin_tabs |
Add or remove admin settings tabs |
Every hook was called mpp_* in Multipage; the old names still work but are deprecated. See ARCHITECTURE.md for the complete hooks reference.
WP-CLI
wp post-chapters status # State of the chapter index and of the background rebuild
wp post-chapters rebuild # Rebuild the chapter index of every post
wp post-chapters rebuild --dry-run # Report what would change, without writing
Languages
Translation files are located in /languages/. Available languages:
- English (default)
- French (fr_FR)
- German (de_DE)
- Italian (it_IT)
- Spanish (es_ES)
For these four languages the bundled files are used even when a language pack is installed in wp-content/languages/plugins/, since a pack can lag behind the strings of a release. Other languages use the installed language pack, if any. The pchap_prefer_bundled_translations filter (add_filter( 'pchap_prefer_bundled_translations', '__return_false' );) gives the language packs precedence. To contribute a translation, see CONTRIBUTING.md.
Development
The plugin itself needs no build step. The development tools are installed with Composer and the tests run in wp-env (Docker and Node.js 22.13+ required). Clone the repository into a folder named post-chapters.
composer install # PHPCS, WPCS, PHPCompatibilityWP, PHPUnit (dev only)
composer lint # php -l on every PHP file
composer phpcs # WordPress Coding Standards (composer phpcbf to fix)
npx @wordpress/env@12 start # WordPress 7.1.4 / PHP 8.4 at http://localhost:8888
composer test:wp-env # PHPUnit suite inside wp-env (reinstalls its database)
bin/check-i18n.sh # Translation files in sync with the code (WP-CLI + gettext)
bin/build-zip.sh # Release archive: build/post-chapters.zip (--wporg: WordPress.org build)
composer test runs PHPUnit directly when the WordPress test library is available (WP_TESTS_DIR). See CONTRIBUTING.md for the full workflow and ARCHITECTURE.md for the internals.
History
Post Chapters started as Multipage (sgr-nextpage-titles), created by Sergio De Falco (SGr33n). The original code up to version 1.3.1 and the releases up to 1.5.12 on WordPress.org (2021) are his work. Paul Argoud then took over development on GitHub (1.5.13 to 1.7.1), bringing the plugin up to modern WordPress and PHP standards, and renamed it Post Chapters in 2.0.0. The WordPress.org listing of Multipage remains in the hands of its original author.
Changelog
See CHANGELOG.md for a detailed history of changes.
License
This plugin is licensed under the GNU General Public License v3.0.