RT Filter Page List

plugin banner

Hooks into WordPress core function wp_list_pages, and removes pages from the generated list that are not part of the current navigation path.

Author:Roy Tanck (profile at wordpress.org)
WordPress version required:3.5.2
WordPress version tested:6.5
Plugin version:1.0
Added to WordPress repository:13-05-2014
Last updated:05-04-2024
Rating, %:100
Rated by:1
Plugin URI:http://www.roytanck.com
Total downloads:3 306
Active installs:20+
plugin download
Click to start download

Hooks into WordPress core function wp_list_pages, and removes pages from the generated list that are not part of the
current navigation path. This creates an accordion navigation effect, and is an alternative approach to the CSS-based
way suggested in the Codex.

By removing unneeded HTML elements server-side, page size is reduced, and client-side rendering will usually be faster.
This is especially true for older browsers, and sites with a large number of published pages.

This plugin is intended to be used with the “pages” widget that comes with WordPress, or any navigation element that uses
wp_list_pages.

There are two ways the plugin can apply the filter.

  1. By modifying the default Pages widget that comes with WordPress
  2. By applying the filter everywhere wp_list_pages is used

Please note that since the second option uses the wp_list_pages hook, the filtering will take place anywhere
wp_list_pages is used. This includes menu locations to which no custom menu is assigned. Please make sure all your
menu locations have a custom menu assigned to them to avoid unexpected behavior.

This plugin requires the PHP DOMDocument extension, and PHP5.


Screenshots
FAQ
ChangeLog