Collapsing Pages

Collapsing Pages

Wordpress plugin

Install on Wordpress

App Details

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?

  • 2.0.3 (2024.01.01)

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

    • Got rid of some warnings
    • Updated deprecated property __experimentalGroup
    • Tested with 6.4.1
  • 2.0.1 (2023.06.16)

    • Bug fixes
  • 2.0.0 (2023.03.17)

    • Updated to use Gutenberg block
  • 1.0.1 (2016.05.09)

    • Fixed bug where sometimes setting accordion to false broke javascript
  • 1.0 (2015.08.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

I use this plugin in my blog at http://blog.robfelty.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)

Pricing

Starting from $0 per month.

Check Out the Social Media & RSS Feeds Widget

By Common Ninja

Social Media & RSS FeedsTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

menu
navigation
pages
sidebar
widget

Developed By

robfelty

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Social Media & RSS Feeds for Wordpress logo

Social Media & RSS Feeds

Add social media and RSS feeds to your site to display fresh content, grow your online presence, and keep visitors engaged with real time updates.

Tabs for Wordpress logo

Tabs

Use tabs to organize content into clear sections, improve navigation, and help visitors switch between topics quickly for a smoother user experience.

AliExpress Reviews for Wordpress logo

AliExpress Reviews

Show AliExpress reviews to build trust, improve credibility, and help visitors make confident purchase decisions that support higher sales.

World Clock for Wordpress logo

World Clock

Display multiple time zones with a world clock widget that offers clear global times, customizable styles, and a responsive design for better user experience.

Slideshow for Wordpress logo

Slideshow

Present images in a Slideshow carousel that rotates or slides through visuals, helping you highlight key content within a clean, engaging layout.

Google Maps for Wordpress logo

Google Maps

Show business locations clearly with a Google Maps widget that displays multiple points, detailed info, and customizable styles to help visitors find you easily.

Instagram Slider for Wordpress logo

Instagram Slider

Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.

Calculator for Wordpress logo

Calculator

Create a TDEE Calculator that helps visitors estimate daily calorie needs and make informed decisions.

PDF Viewer for Wordpress logo

PDF Viewer

Add a PDF viewer to your site to display documents, share product information, and give visitors easy access to helpful content in one place.

Testimonials Slider for Wordpress logo

Testimonials Slider

Add a testimonials slider to your site to showcase real customer feedback, build credibility, and increase trust that leads to higher conversions.

Social Media Links for Wordpress logo

Social Media Links

Use social media links with sticky buttons that keep your profiles visible, boost engagement, and help promote your content more effectively across your site.

Etsy Reviews for Wordpress logo

Etsy Reviews

Show Etsy reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms