WordPress plugin intelligence profile

Collapsing Pages

This plugin uses Javascript to dynamically expand or collapsable the set of pages for each parent page.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.4
Current version2.0.3
WordPress coverageTested up to WordPress 6.4
Minimum stackWP 5.0 · PHP —
Directory statusactive
Last directory update1 Jan 20242y ago
Active installations200Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Collapsing Pages version 2.0.3 as active, updated 2y ago and tested up to WordPress 6.4.

Overview

About this plugin

This is a very simple plugin that uses Javascript to form a collapsable set of

links in the sidebar for the pages. Every page corresponding to a given

parent page will be expanded.

It is largely based off of my Collapsing Pages and Collapsing Pages

plugins.

What’s new?

-

01)

  • Fixed issue with subsubpages not closing correctly
  • Got rid of some more warnings
  • Tested with 6.4.2

-

01)

  • Got rid of some warnings
  • Updated deprecated property __experimentalGroup
  • Tested with 6.4.1

-

16)

  • Bug fixes

-

17)

  • Updated to use Gutenberg block

-

09)

  • Fixed bug where sometimes setting accordion to false broke javascript

-

12)

  • Compatible with WordPress 4.3
  • Fixed bug where expanding symbol showed up at lowest depth specified instead

(thanks to tkibler for pointing it out)

  • Added option to only display pages of the current subpage
  • Added option to show top-level page (previously it was always shown)
  • Added accordion style option
  • Cleaned up widget settings
  • improved style management, including the ability to specify style per widget
  • Switched from unicode symbols to html entities
  • Not showing tags for title if empty
  • Fixed bug with title attribute of pages
  • Totally rewrote javascript

Options

If using the manual version, you can pass options either as an array, or using

the query style, just like for other wordpress functions such as

wp_list_pages

$defaults=array( 'title' => __('Pages', 'collapsing-pages'), 'sortOrder'=> 'ASC', 'sort'=> 'pageName', 'defaultExpand'=> '', 'expand' => 0, 'depth' =>-1, 'inExcludePage' => 'exclude', 'linkToPage' => true, 'inExcludePages' => '', 'showPosts' => false, 'animate' => 0, 'useCookies' => true, 'postTitleLength' => 0, 'showTopLevel' => true, 'currentPageOnly' => false, 'debug' => false, );

  • inExcludePage
  • Whether to include or exclude certain pages
  • ‘exclude’ (default)
  • ‘include’
  • inExcludePages
  • The pages which should be included or excluded
  • showPosts
  • Whether or not to include posts as well as pages. Default if false
  • linkToPage
  • True, clicking on a parent page title will link to that page (default)
  • False, clicking on a parent page will expand to show sub-pages
  • sort
  • How to sort the pages. Possible values:
  • ‘pageName’ the title of the page (default)
  • ‘pageId’ the Id of the page
  • ‘pageSlug’ the url of the page
  • ‘menuOrder’ custom order specified in the pages settings
  • sortOrder
  • Whether pages should be sorted in normal or reverse

order. Possible values:

  • ‘ASC’ normal order (a-z 0-9) (default)
  • ‘DESC’ reverse order (z-a 9-0)
  • expand
  • The symbols to be used to mark expanding and collapsing. Possible values:
  • ‘0’ Triangles (default)
  • ‘1’ + –
  • ‘2’ [+] [-]
  • ‘3’ images (you can upload your own if you wish)
  • ‘4’ custom symbols
  • customExpand
  • If you have selected ‘4’ for the expand option, this character will be

used to mark expandable link categories

  • customCollapse
  • If you have selected ‘4’ for the expand option, this character will be

used to mark collapsible link categories

  • postTitleLength
  • Truncate post titles to this number of characters (default: 0 = don’t

truncate)

  • animate
  • When set to true, collapsing and expanding will be animated
  • useCookies
  • When true, expanding and collapsing of pages is remembered for each

visitor. When false, pages are always display collapsed (unless

explicitly set to auto-expand). Possible values:

  • true (default)
  • false
  • showTopLevel
  • True – show top level pages (default)
  • False – only display sub-pages and below
  • currentPageOnly
  • True – show only parent and sub pages of the current page
  • False – show all pages (subject to the include or exclude parameters

set) (default)

  • debug
  • When set to true, extra debugging information will be displayed in the

underlying code of your page (but not visible from the browser). Use

this option if you are having problems

Examples

collapsPage('animate=true&sort=ASC&expand=3,inExcludePages=about')

This will produce a list with:

* animation on

* shown in alphabetical order

* using images to mark collapsing and expanding

* exclude page about

Demo

com

CAVEAT

Currently this plugin relies on Javascript to expand and collapse the links.

If a user’s browser doesn’t support javascript they won’t see the links to the

posts, but the links to the pages will still work (which is the default

behavior in wordpress anyways)

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • menu
  • navigation
  • pages
  • sidebar
  • widget
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.4

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.4.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.4
Minimum requirementsWordPress 5.0 · PHP not listed
Update activity1 Jan 20242y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.