Sort Child Pages with Looper Consumer

I am trying to use a looper provider to output the children of a page sorted by their page title or order. However, I am failing with the sorting.

The Looper Provider Type ‘Current Page Children’ returns the sub-pages sorted by page ID in descending order. How can I change this?

Hi @jfromm,

Thanks for reaching out.
Regretfully, there is no such option to mention the order for Current Page Children option of Looper Provider. I will create a feature request on this, so it might be taken into account in the future.

Thanks

Thank you for your answer. Is there any way to achieve the desired sorting with an individual query string? Unfortunately I am not skilled enough (and did not fully understand the hints on other topics) to test this myself.

Hi @jfromm,

The order of child pages is actually managed from the WordPress backend. While editing a post, open the Post Attributes section where you would normally set things like Page Template and Parent. There is an Order option which WordPress uses behind the scenes to order the children of a page. This order will be applied to the results of the Current Page children looper.

I’m sorry this isn’t more clear in our documentation. I’m making a note so we can update that to help avoid confusion in the future.

Hi @alexander,

thank you for your reply. I have already tried what you describe. This would also be the expected behavior, but I can’t confirm it. The order option does not take effect. Rather it behaves like this:

So this effectively means that the last page created will be displayed in the first position and the first page created will be displayed in the last position. I have no other way to influence the order in Pro.

Hi @jfromm,

As explained by my colluege, the ordering of the page is maintained by the ID of respective pages, and the Current Page Children option sort the pages by descending order on IDs, and that is why the last created page is coming on the top.

Thanks for understanding

Hi @tristup,

seems, there is a missunderstanding on any side. @alexander described the sorting by Wordpress based on the Order option, not the ID you referr to. Actually, my observation is, that the Order option is not applied to the results of the Current Page Children looper.

Maybe I got something wrong, or do Alexander and you talk about the same thing? In my understanding, you contradict each other. I don’t want to nag at all, but rather to make sure that all three of us are talking about the same thing.

Hi @jfromm,

Sorry, if that creates any confusion.
We are talking about the same thing, where I explained that the WordPress uses the Page ID by default for maintaining the order of child pages. If the Order value is set, it overrides the default option of sorting. But regretfully the Order options do not work with Current Page Children.

Thanks for understanding.

Hi @tristup,

I got it now. Thanks for clarification.

Hi @jfromm,

You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free to reach us.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.