Title: Sort Page List by Last Name
Author: Studio Hyperset
Published: <strong>4 December 2011</strong>
Last modified: 3 April 2020

---

Search plugins

![](https://ps.w.org/sort-page-list-by-last-name/assets/banner-772x250.png?rev=1721680)

This plugin **hasn’t been tested with the latest three major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/sort-page-list-by-last-name/assets/icon-256x256.png?rev=1032694)

# Sort Page List by Last Name

 By [Studio Hyperset](https://profiles.wordpress.org/studiohyperset/)

[Download](https://downloads.wordpress.org/plugin/sort-page-list-by-last-name.1.0.zip)

 * [Details](https://en-gb.wordpress.org/plugins/sort-page-list-by-last-name/#description)
 * [Reviews](https://en-gb.wordpress.org/plugins/sort-page-list-by-last-name/#reviews)
 *  [Installation](https://en-gb.wordpress.org/plugins/sort-page-list-by-last-name/#installation)
 * [Development](https://en-gb.wordpress.org/plugins/sort-page-list-by-last-name/#developers)

 [Support](https://wordpress.org/support/plugin/sort-page-list-by-last-name/)

## Description

Aimed at archivists and other WordPress developers who use the names of individuals
as page titles, this plugin sorts `wp_list_pages`-generated page lists by last name.
More generally, the plugin can also be used to sort `wp_list_pages`-generated page
lists by the last word of any page’s title.

## Installation

After installing and activating, developers can order any `wp_list_pages`-generated
page list by surname — or, more generally, last word — using the `sortbylastname
=1` parameter, e.g., `<?php wp_list_pages('title_li=&sortbylastname=1'); ?>`. Use
a “0” to (temporarily) disable the plugin.

## FAQ

  Links

 * For feedback and help, visit: http://getsatisfaction.com/studio_hyperset/products/
   studio_hyperset_wordpress_plugins
 * To learn about other Studio Hyperset WordPress plugins, visit http://studiohyperset.
   com/#solutions
 * To help develop the Sort Page List by Last Name plugin, visit https://github.
   com/studiohyperset/sort-page-list-by-last-name

  Developer Notes

PLEASE NOTE: Line 14 extracts each separate line of HTML from the original `wp_list_pages`
output and puts it into an array called `$lines.` The `\n` parameter tells the explode
command that each line ends with a carriage return. However, as of WordPress 3.2.1,
the explode command assumes each line ends when it finds an `n`. As such, if developers
edit the plugin using the WordPress code editor, they should add an extra backslash(`\`)
in front of the `n` before saving the file (e.g, `$lines = explode("\\n", $val);`).
The line will revert to `$lines = explode("\n", $val);` on save.

Interested in helping develop the Sort Page List by Last Name plugin? Visit the 
GitHub repository: https://github.com/studiohyperset/sort-page-list-by-last-name

## Reviews

There are no reviews for this plugin.

## Contributors and Developers

“Sort Page List by Last Name” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ Studio Hyperset ](https://profiles.wordpress.org/studiohyperset/)
 *   [ oqm4 ](https://profiles.wordpress.org/oqm4/)
 *   [ Spark Development ](https://profiles.wordpress.org/ryanajarrett/)

[Translate “Sort Page List by Last Name” into your language.](https://translate.wordpress.org/projects/wp-plugins/sort-page-list-by-last-name)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/sort-page-list-by-last-name/),
check out the [SVN repository](https://plugins.svn.wordpress.org/sort-page-list-by-last-name/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/sort-page-list-by-last-name/)
by [RSS](https://plugins.trac.wordpress.org/log/sort-page-list-by-last-name/?limit=100&mode=stop_on_copy&format=rss).

## Change Log

#### 1.0

 * 12/3/11 – Initial release

## Meta

 *  Version **1.0**
 *  Last updated **7 years ago**
 *  Active installations **10+**
 *  WordPress version ** 3.0 or higher **
 *  Tested up to **5.4.24**
 *  Language
 * [English (US)](https://wordpress.org/plugins/sort-page-list-by-last-name/)
 * Tags
 * [function](https://en-gb.wordpress.org/plugins/tags/function/)[list](https://en-gb.wordpress.org/plugins/tags/list/)
   [page](https://en-gb.wordpress.org/plugins/tags/page/)[title](https://en-gb.wordpress.org/plugins/tags/title/)
   [wp_list_pages](https://en-gb.wordpress.org/plugins/tags/wp_list_pages/)
 *  [Advanced View](https://en-gb.wordpress.org/plugins/sort-page-list-by-last-name/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/sort-page-list-by-last-name/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/sort-page-list-by-last-name/reviews/)

## Contributors

 *   [ Studio Hyperset ](https://profiles.wordpress.org/studiohyperset/)
 *   [ oqm4 ](https://profiles.wordpress.org/oqm4/)
 *   [ Spark Development ](https://profiles.wordpress.org/ryanajarrett/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/sort-page-list-by-last-name/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=C2KQADH2TGTS4)