WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Flexi Pages Widget

A highly configurable WordPress sidebar widget to list pages and sub-pages. User friendly widget control comes with various options.

Localization

Versions 1.5.5 and above supports localization. The localization template file (flexipages.pot) can be found in the 'languages' folder of the plugin. The resulting PO and MO files should go in the 'flexi-pages-widget/languages/' directory, and should be named in the format flexipages-xx_YY.po and flexipages-xx_YY.mo files respectively. Where xx refers to the language code and YY to the locale. For example, the German translation files will have the name flexipages-de_DE.po and flexipages-de_DE.mo. This xx_YY should be the same as the value you define for WPLANG in wp-config.php.

An application like poEdit can be used to translate the plugin, or just translate the strings in the flexipages.pot file and send it to the plugin author. All translations sent to the author will be bundled with the next version of the plugin.

As of the current version, Flexi Pages Widget is translated into the following languages:

flexipages() template function

Instead of using the widget, the function flexipages() can be called from anywhere in the template.

Parameteres

sort_column

(string) Sorts the list of Pages in a number of different ways. The default setting is sort alphabetically by Page Order.

  • 'post_title' - Sort Pages alphabetically (by title) - default
  • 'menu_order' - Sort Pages by Page Order. N.B. Note the difference between Page Order and Page ID. The Page ID is a unique number assigned by WordPress to every post or page. The Page Order can be set by the user in the Write>Pages administrative panel.
  • 'post_date' - Sort by creation time.
  • 'post_modified' - Sort by time last modified.
  • 'ID' - Sort by numeric Page ID.
  • 'post_author' - Sort by the Page author's numeric ID.
  • 'post_name' - Sort alphabetically by Post slug.

sort_order

(string) Change the sort order of the list of Pages (either ascending or descending). The default is ascending. Valid values:

  • 'asc' - Sort from lowest to highest (Default).
  • 'desc' - Sort from highest to lowest.

exclude

(string) Define a comma-separated list of Page IDs to be excluded from the list (example: 'exclude=3,7,31'). There is no default value.

include

(string) Only include certain Pages in the list generated by get_pages. Like exclude, this parameter takes a comma-separated list of Page IDs. There is no default value.

child_of

(integer) Displays the sub-pages of a single Page only; uses the ID for a Page as the value. Defaults to 0 (displays all Pages). Note that the child_of parameter will also fetch "grandchildren" of the given ID, not just direct descendants.

  • 0 - default, no child_of restriction

parent

(integer) Displays those pages that have this ID as a parent. Defaults to -1 (displays all Pages regardless of parent). Note that this can be used to limit the 'depth' of the child_of parameter, so only one generation of descendants might be retrieved. You must use this in conjuction with the child_of parameter. Feed it the same ID.

  • -1 - default, no parent restriction
  • 0 - returns all top level pages

show_subpages

  • 0 - Do not show sub-pages. List only top level pages.
  • 1 - Show sub-pages.
  • 2 - Show only related sub-pages. A sub-page is listed only when the user visits the parent and sibling pages of the sub-page. Thus, this will display the top level pages, children and siblings of the current page, and siblings of the parent page.
  • 3 - Show only strictly related sub-pages. Similar to '2' above except that siblings of parent page won't be displayed when on a sub-page.

hierarchy

(boolean) Display sub-Pages in an indented manner below their parent or list the Pages inline. The default is true (display sub-Pages indented below the parent list item). Valid values:

  • 1 (true) - default
  • 0 (false)

depth

(integer) This parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. The default value is 0 (display all pages, including all sub-pages).

  • 0 - Pages and sub-pages displayed in hierarchical (indented) form (Default).
  • -1 - Pages and sub-pages displayed in flat (no indent) form.
  • 1 - Show only top level Pages. Equivalent to 'show_subpages=0'.
  • 2 - Value of 2 (or greater) specifies the depth (or level) to descend in displaying Pages.

dropdown

(boolean) Whether to display the items in the widget as list or dropdown.

  • 1 (True) - will display the items in dropdown format.
  • 0 (False) - default - will display the items as list.

echo

(boolean) Toggles the display of the generated list of links or return the list as an HTML text string to be used in PHP. The default value is 1 (display the generated list items). Valid values:

  • 1 (True) - default
  • 0 (False)

Examples

  • flexipages() will display the list with default options.

  • flexipages('echo=0') will return the list with default options for other parameters.

  • flexipages('echo=0&show_subpages=0') will return only top level pages.

  • flexipages('sort_column=ID&exclude=2,10,14') will display the list with items sorted in order of ID. The page IDs 2, 10 and 14 will be excluded.

Requires: 2.7 or higher
Compatible up to: 3.6-beta3-24407
Last Updated: 2013-6-5
Downloads: 277,201

Ratings

4 stars
4.2 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,3,3
100,2,2
60,5,3 100,1,1
100,4,4 50,12,6 71,7,5 67,3,2
100,1,1 100,1,1 100,4,4 92,12,11
64,11,7
100,1,1 59,17,10
100,1,1
100,2,2
67,6,4
0,1,0
67,3,2 100,1,1 100,2,2
100,1,1
67,3,2
50,12,6 100,1,1
100,3,3
50,6,3
100,4,4
100,1,1
100,1,1
71,7,5 100,1,1
100,2,2
17,6,1
25,4,1
50,2,1
0,1,0
100,3,3
100,1,1