Skip to content

Feature/enable nav logic for all post types#26

Merged
william-man merged 2 commits into
mainfrom
feature/enable-nav-logic-for-all-post-types
Apr 7, 2026
Merged

Feature/enable nav logic for all post types#26
william-man merged 2 commits into
mainfrom
feature/enable-nav-logic-for-all-post-types

Conversation

@william-man
Copy link
Copy Markdown
Contributor

@william-man william-man commented Apr 2, 2026

Description of changes

This PR updates the chapter navigation to support all post types instead of being hardcoded to long-read. This is done by using post_type => 'any' in the get_posts query, which allows the plugin to work across all post types.

To test

  1. Install this plugin into a site repo and fetch this branch feature/enable-nav-logic-for-all-post-types.
  2. In this branch, copy the example template here into your site repo templates folder.
  3. In admin, activate the plugin and check the Long read post type is available, and create a new long read post with some heading blocks at various levels. (Might need to flush permalinks in Settings > Permalinks save).
  4. View the post, check that the long read navigation still renders on the page.
  5. To check the navigation functionality is working for other post types, add this or similar to your template:
/**
 * Template Name: Long Read
 * Template Post Type: post, page, guidance, long-read
 */
  1. On your chosen post type, create a new post similar to the one you created for the long-read post type and check that it renders the navigation functionality.
  2. Check that it is not made available for other post types.

Checklist

  • Changelog updated
  • If new release: major version tag to be bumped after release (see docs)

Copy link
Copy Markdown
Contributor

@sbrody sbrody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works without error on ukss

@william-man william-man merged commit b07f3ae into main Apr 7, 2026
2 checks passed
@william-man william-man deleted the feature/enable-nav-logic-for-all-post-types branch April 7, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants