metinsaylan // rogue developer

Subpages Extended : Sorting your pages list with shortcode


Subpages Extended allows you to create dynamic sub-page indexes on your wordpress blog. Using its powerful shortcode [[subpages]] you can easily generate page indexes. Here i will show you how to sort your pages.

*** Shortcode gives you the ability to sort your pages using wordpress core functions. You can simply sort your pages using Menu Order, and then post titles using this shortcode:

[[subpages sort_column="menu_order,post_title"]]

Other sorting options for subpages shortcode are listed below:

  • 'post_title' - Sort Pages alphabetically (by title) - default
  • 'menu_order' - Sort Pages by Page Order.
  • '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.

To sort your pages in descending order simply include sort_order="DESC" in your shortcode:

[[subpages sort_column="ID" sort_order="DESC"]]

This shortcode will show newer pages on top.

Using the power of this shortcode you can make dynamic indexes on your site so easily. For more samples & demos see the plugin page.

Search Subpages Extended : Sorting your pages list with shortcode on Google