• Plans & Pricing
  • Log in
  • Get started
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress 
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Get started
  • Sign up
  • Log in
About
  • Plans & Pricing
Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress  
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Jetpack App
  • Learn more
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Search
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Forums / List pages shortcode not displaying in correct order

List pages shortcode not displaying in correct order

  • Unknown's avatar
    musicdoc1 · Member · Apr 19, 2016 at 8:30 pm
    • Copy link Copy link
    • Add topic to favorites Add topic to favorites

    The intention is to list only five specific pages, out of several hundred published on my site, in a text widget, and to display the list in the sidebar on all pages. Following the instructions and examples in the List Pages Shortcode support page I created the following shortcode. It displays the correct five pages, with the dates included, but the order is confused. The one displaying fifth should be third, because it was the third published, chronologically. What have I done wrong, and how can I fix this?

    [list-pages show_date="true" include="148281, 153768, 153686, 152921, 152719, 152544" sort_column="post_date"]

  • Unknown's avatar
    musicdoc1 · Member · Apr 19, 2016 at 8:32 pm
    • Copy link Copy link

    Correction:
    There are six pages. The one displaying sixth should be third. And those displaying 3rd, 4th, and 5th should each be advanced one place.

  • Unknown's avatar
    musicdoc1 · Member · Apr 26, 2016 at 6:07 pm
    • Copy link Copy link

    I added a link to another page yesterday. The “Last Night When We Were Young” link, dated 21 March is still displaying out of order. It is listed last (seventh) when it should be third. All of the other links are displaying in chronological order.

  • Unknown's avatar
    supernovia · Staff · Apr 26, 2016 at 10:59 pm
    • Copy link Copy link

    Hi @musicdoc1, I’m thinking the list pages shortcode isn’t intended to set the pages in a specific order. But you can specify a “page number” for each of those pages if you’d like.

    In the new editor, it’s under Page Options > Order. WP-admin has a similar setting though you may need to enable the box under screen options, so let me know if you need help finding it.

    It doesn’t really matter what numbers you write, and I don’t believe they’ll show up anywhere in the theme. Just know that the first number needs to be lowest, and so on. Let me know if you need more help.

  • Unknown's avatar
    musicdoc1 · Member · Apr 27, 2016 at 3:31 am
    • Copy link Copy link

    @supernovia,
    Hi.

    I’m thinking the list pages shortcode isn’t intended to set the pages in a specific order.

    It is intended to display them in specific order, according to the List Pages Shortcode support page, as I mentioned above. It says:

    sort_column: sorts the list of Pages in a number of different ways. The default setting is sort alphabetically by Page title.

    • ‘post_title’ – Sort Pages alphabetically by title (Default).
    • ‘menu_order’ – Sort Pages by Page Order. 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 Pages -> Edit screen.
    • ‘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.

    I’m simply using the “post_date” option suggested in the support page.

    Thanks for the suggested alternative. I may try it, though I’m quite averse to entering the new editors.

    Regards, doc

  • Unknown's avatar
    musicdoc1 · Member · Apr 27, 2016 at 1:56 pm
    • Copy link Copy link

    @supernovia,
    Re:

    I’m thinking the list pages shortcode isn’t intended to set the pages in a specific order.

    Secondly, the list pages shortcode does display 6 of 7 items in the proper chronological order in the example referred to above, which is visible on my site in the sidebar. Only one item is continually displayed out of chronological order as I add new items.

  • Unknown's avatar
    supernovia · Staff · Apr 27, 2016 at 7:44 pm
    • Copy link Copy link

    Ah, my apologies. I totally misunderstood the first post. You are sorting by post date… I’d somehow thought you were trying to sort them in the order listed.

    I’ll do some digging.

  • Unknown's avatar
    supernovia · Staff · Apr 27, 2016 at 7:46 pm
    • Copy link Copy link

    Also, I’ve found your draft; if you’ll leave that as-is we’ll do testing with that. Is that fine?

  • Unknown's avatar
    musicdoc1 · Member · Apr 28, 2016 at 6:54 am
    • Copy link Copy link

    @ supernovia,’
    No worries.

    Also, I’ve found your draft; if you’ll leave that as-is we’ll do testing with that. Is that fine?

    Well, I’ve already revised it a bit. But, yes, you may use that draft page for testing. I’ll leave it as is for a while.

  • Unknown's avatar
    supernovia · Staff · Apr 28, 2016 at 8:03 pm
    • Copy link Copy link

    No worries, I wasn’t able to duplicate this on my test site at first, but I have it now. I’ve filed a bug report and will let you know our findings. Cheers!

  • Unknown's avatar
    musicdoc1 · Member · Apr 28, 2016 at 9:22 pm
    • Copy link Copy link

    Thank you!

  • Unknown's avatar
    musicdoc1 · Member · May 16, 2016 at 11:09 pm
    • Copy link Copy link

    To whom it may concern,

    The issue reported in the OP persists. Today, my latest addition is also displayed out of order when using List Pages shortcode. I now have two of the nine most recent pages listed in the wrong chronological order by the shortcode.

  • Unknown's avatar
    supernovia · Staff · May 17, 2016 at 2:51 am
    • Copy link Copy link

    @musicdoc1 I’ll let you know when it’s fixed.

  • The topic ‘List pages shortcode not displaying in correct order’ is closed to new replies.

Tags

  • column sort
  • List Pages Shortcode
  • post date order

About this topic

  • In: Support
  • 2 participants
  • 12 replies
  • Last activity 10 years
  • Latest reply from musicdoc1

Couldn't find what you needed?

Contact us

Contact us

Get answers from our AI assistant, with access to 24/7 expert human support on paid plans.

Browse our guides

Browse our guides

Find step-by-step solutions to common questions in our comprehensive guides.

WordPress.com

Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Professional Email
  • Website Design Services
  • WordPress Studio
  • Enterprise WordPress
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • WordPress.com Blog
  • Business Name Generator
  • Logo Maker
  • WordPress.com Reader
  • Accessibility
  • Remove Subscriptions
Help
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
  • Developer Resources
Company
  • About
  • Press
  • Terms of Service
  • Privacy Policy
  • Do Not Sell or Share My Personal Information
  • Privacy Notice for California Users
DeutschEspañolFrançaisBahasa IndonesiaItalianoNederlandsPortuguês do BrasilSvenskaTürkçeРусскийالعربيةעִבְרִית日本語한국어简体中文繁體中文English

Mobile Apps

  • Download on the App Store
  • Get it on Google Play

Social Media

  • WordPress.com on Facebook
  • WordPress.com on X (Twitter)
  • WordPress.com on Instagram
  • WordPress.com on YouTube

Automattic

Automattic
Work With Us
    • WordPress.com Forums
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions