Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Loop: sorting by A-Z/Z-A ignores numerical order #61650

Open
liviopv opened this issue May 14, 2024 · 0 comments
Open

Query Loop: sorting by A-Z/Z-A ignores numerical order #61650

liviopv opened this issue May 14, 2024 · 0 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended

Comments

@liviopv
Copy link

liviopv commented May 14, 2024

Description

When sorting a Query Block alphabetically, posts starting with numbers will be sorted based on the first character only [1, 10, 11 (...), 2], without considering its numerical order. I'd expect it to sort posts considering the numerical order as well.

Step-by-step reproduction instructions

  1. Publish a post with the title starting with "1"
  2. Publish a post with the title starting with "2"
    1. Publish a post with the title starting with "10"
  3. Add a Query Loop to a page, sort by A-Z or Z-A
  4. The order will be 1-10-2, instead of 1-2-10.

Screenshots, screen recording, code snippet

CleanShot 2024-05-14 at 12 01 04@2x

Environment info

  • WordPress 6.5.3, GB 18.3

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@liviopv liviopv added the [Type] Bug An existing feature does not function as intended label May 14, 2024
@colorful-tones colorful-tones added the [Block] Query Loop Affects the Query Loop Block label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Bug An existing feature does not function as intended
2 participants