Flexi Pages Widget

Download Latest version: 1.4.1 (updated on 21 May 2008)

Flexi Pages Widget is a highly configurable widget to list pages and sub-pages in WordPress sidebar. User friendly widget control comes with plenty of options. ‘Flexi Pages’ widget can be used as an alternative to the default WordPress ‘Pages’ widget.

Features

  • Option to display sub-pages only in parent page and related pages.
  • Option to easily select and exclude certain pages from getting displayed in the list. Alternatively, only certain pages can be displayed by using the ‘include’ option.
  • Option to include a link to the home page.
  • Other options include title, sort column/order, text to be displayed for home page link, other display and depth options.
  • Multiple instances of the widget — upto nine instances of the widget can be added to the sidebar
  • Instead of using the widget, the function flexipages() can be called from anywhere in the template (more information).

Screenshots

Click on a thumbnail for full size image.

Flexi Pages Widget — screenshot 1
Flexi Pages Widget — screenshot 2Flexi Pages Widget — screenshot 3

  1. Controls for Flexi Pages Widget
  2. Pages listed on the home page when “List sub-pages only in parent and related pages in the hierarchy” option is selected.
  3. Pages listed on a page having sub pages. You can see the sub-pages expand here while only top level pages are listed in the home page on screenshot 2. Same settings as screenshot 2.

Download

Requires atleast WordPress version 2.1. Tested upto WordPress 2.5

Download Flexi Pages Widget plugin for WordPress Version 1.4.1

Downloaded a total of 3540 times

You are free to use the plugin under terms specified by GPL.

Installation

  1. Unzip the compressed file and upload ‘flexi-pages.php’ file (or ‘flexi-pages’ directory) directory to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin ‘Flexi Pages Widget’ through the ‘Plugins’ menu in WordPress admin
  3. Go to WP Admin » Presentation » Widgets, drag ‘Flexi Pages 1′ widget into the sidebar and choose your options
  4. An option to select multiple instances of the widget is available in the widgets page. You can have upto 9 instances of the widget

Contact me for suggestions/questions/feature requests/bug reports. You can also leave your message here as a comment.

The flexipages() template function

Instead of using the sidebar widget, the function flexipages() can be used as a template function to display the list of pages. All options available for wp_list_pages() can also be used for flexipages(). Additionally in flexipages(), the depth parameter has two more choices (-2 and -3), and there is an extra parameter to display a link to the blog home page.

depth (integer)

This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by flexipages. The default value is -2.

  • 0 - All pages and sub-pages displayed in hierarchical (indented) form.
  • -1 - All pages in sub-pages displayed in flat (no indent) form.
  • -2 (Default) - List sub-pages only in parent and related pages in hierarchy.
  • -3 - Similar to ‘-2′ above, but siblings of parent pages won’t be displayed. Only top level pages and pages in the hierarchy will show up.
  • 1 - Show only top level Pages
  • 2 - Value of 2 (or greater) specifies the depth (or level) to descend in displaying Pages.

home_link (string)

If a value is specified for this parameter, a link to the home page of the blog will be displayed on top of the list of pages. The link text will be the value specified. For example, flexipages('home_link=Home') will display a link to the home page with link text as ‘Home’.

In addition to the above two, all other parameters used with wp_list_pages() can also be used with flexipages(). Refer WordPress documentation for more details about the wp_list_pages() function and to know about how to pass the parameters into the function.

Frequently Asked Questions

  1. After selecting a few pages for exclusion, isn’t it possible to deselect all pages? There is always one page selected for exclusion.
    • It is possible to deselect all pages. Hold the ‘Ctrl’ key in your keyboard and click on the name of the page that’s not getting deselected.
  2. When the option “List sub-pages only in parent and related pages in hierarchy” is selected, top level pages, children and siblings of the current page, and siblings of the parent page get listed. Is it possible to get rid of siblings of parent page on a subpage while using this option?
    • Yes. But you have to select the ‘Custom depth level’ option to achieve this. Enter the number ‘-3′ for custom depth. This way only top level pages and pages in the hierarchy will show up.
  3. Is there an option to list only sub pages and hide the parent pages?
    • Although such an option does not exist, the ‘Include’ option can be used to achieve this. Select ‘Include’ instead of ‘Exclude’ and select all the pages you want to be listed. Pages left out won’t be displayed.

Change Log

2008-05-21: Version 1.4.1

  • Bug fixes (issues regarding include/exclude sub-pages only with ‘List sub-pages only in parent and related pages in hierarchy’ option.)

2008-04-06: Version 1.4

  • Fixed the odd behaviour when the widget is placed below the recent posts widget.
  • Removed the redundant check box for home page link in widget controls
  • Tested with WordPress 2.5; widget control box styling compatible with WP 2.5

2008-02-19: Version 1.3

  • Multiple instances of the widget
  • Added ‘Include pages’ option
  • flexipages() template function
  • Other minor improvements

2007-08-31: Version 1.2

  • Added option to provide a custom text for the home page link
  • Custom depth of ‘-3′ will display only parents, siblings and children along with top level pages. Parents’ siblings wont be displayed.
  • Few other improvements and some optimization.
  • Tested with WordPress 2.3-beta1.

2007-08-22: Version 1.1.2

  • Fixed the missing </li> tag for home link
  • Added class name (page_item, current_page_item) for home link

2007-08-17: Version 1.1.1

  • bug fix
  • tested with WordPress 2.2.2

2007-08-12: Version 1.1

  • bug fix

2007-08-08: Version 1.0

  • Initial release
Share / Bookmark: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Furl
  • Ma.gnolia
  • NewsVine
  • Reddit
  • StumbleUpon

175 Comments

Pages: [18] 17 16 15 14 13 12 11 10 9 81 » Show All

  1. Srini says:

    @rumblepup
    flexi categories? nope, not till now. But I think there are a few other plugins by other authors that does what you want. Just look for it in WP plugin directory or try googling.

  2. Extra Things That You Can Do With a Self-Hosted WordPress Blog (that you can’t do with a Free WordPress blog) | blog.classroomteacher.ca says:

    [...] Flexipages Plugin [...]

  3. rumblepup says:

    Been working with this widget and having the time of my life with it.
    I was wondering if you’ve worked this up for categories and subcategories?

  4. Srini says:

    @ Anonymous,
    There is no easy option to do this in the current version of the plugin, however, if you are comfortable with PHP, you can edit the code in flexi-pages-widget.php file and make it possible.

    @ venice,
    I checked the plugin in 2.6.1 and it seems to work without any problem. Anyway there will be an update sometime in the next two weeks and before that I will check and fix if there is an issue.

  5. venice says:

    Hi,

    When is the plug-in going to be updated so it can be usable for latest WP version v 2.6.1? I tested it but it is not working.

    Thanks!

  6. Anonymous says:

    Does this include the ability to have a menu item that’s not really a page, but is a link to a url instead (but still listed alphabetically in the pages menu)?

    I’m trying to find a solution so that my zenphoto install (at /gallery) will show up as if it were just one of the pages in the menu.

  7. Srini says:

    Joust, thanks very much for the suggestions.

    1. Will see if I can include this.
    2. The widget already hides itself when there is nothing to display, doesn’t it?
    3. Once again I will look into the possibilities.

    I am always looking for ideas and suggestions that would help improve the plugin, but I’d also like to keep the widget and widget options simple. So will add more features as I see fit. Thanks.

  8. Joust says:

    Hi Srini,

    *great plugin* that has nearly everything one could imagine regarding page listing. Using it for a while now, I’ve found 3 things, that would make it complete - one was already mentioned here:

    1. “Show only the subpages of all parents pages”. Lets asume I have a page “Recipes” with recipe subpages and I am adding recipes here regularly. In this case I would not want to include them manually every time in the widget’s settings to let them show up in the sidebar. In case I use the exclude option, I would have to exclude newly created non recipe pages manually in the widget.

    2. Checkbox: Hide Widget if no items to display.

    3. Show Widget only if current page includes/excludes… I would e.g. use sub pages to describe the steps for a recipe. I use a flexi page widget titled “Steps” with the configuration described above. Now I want the steps to be visible only if a recipe page is shown.

    Some of this is possible with the Multi pages Widget (outdated) and the Subpages Widget (
    http://wordpress.org/extend/plugins/subpages-widget)

    What do you think?

    Thanks a lot,
    Joust

  9. Srini says:

    Jeni, that’s something you have to ask your theme author :)

    Phunky, to style the sub-pages, use

    .flexipages_widget li li { /* your style here */ }

    And play around with the widget options, you will be able to exclude the parent pages. Though, I will look into the possibility of adding an option to exclude the parent pages.

  10. Phunky says:

    It would be really useful if Sub-Pages had a class on there UL allowing us to style them much more simpler.

    Also think it would be a nice option to be able to NOT link Parent Pages as im using it purely for grouping of pages.

Pages: [18] 17 16 15 14 13 12 11 10 9 81 » Show All

Leave a Reply