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

Sorting by more than one field? #381

Open
wwwolf3 opened this issue Mar 29, 2019 · 0 comments
Open

Sorting by more than one field? #381

wwwolf3 opened this issue Mar 29, 2019 · 0 comments
Labels

Comments

@wwwolf3
Copy link

wwwolf3 commented Mar 29, 2019

I hope this is the right place to post this - I sometime search GitHub but in all these years, this is my first post! I'm not sure if this is a question or a feature request at this point...!

Expected behavior

Sort a blog list by two fields, first a custom field (desc) then, within that, by date (desc). Since there's only one orderby parameter, I'm guessing both HAVE to sort sort 'desc' - but can it excecute the custom sort, THEN the date one... however I'm guessing the parameter order in the shortcode is irrelevant, so even if it could read both, how would it know which to do first...?


Post name	 blog_post_custom_sort	date created
testing			0100		17/3/19
more testing		0002		20/3/19
testing again		0002		15/3/19
another one		0002		10/3/19
still testing		0001		25/3/19


(as in shortcode above, I've already filtered by category)

I removed numerous tag and class parameters to make it easy to read, but left in my troubleshooting reveals (custom field value and ID).

Actual behavior

Sorts by the custom field, ignores the date (posts appear to be random within group of posts with the same value for the custom field - definitely not date published, not ID)

Shortcode used and steps to reproduce the behavior

[catlist
name="jb-ttef"
numberposts=100
date=yes
author=yes
author_posts_link=yes
excerpt=full
excerpt_size=50
posts_morelink="Read more ›"
thumbnail=yes
customfield_display=blog_post_custom_sort
customfield_display_name=no
customfield_orderby=blog_post_custom_sort
orderby=date
order=desc
display_id=yes
]

WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)

WP5.1.1, LCP 0.79
In case relevant, some posts are new, using Gutenberg, others imported from two other sites, and therefore using Classic blocks.

(If you want to submit a feature request, delete the sections above and describe the suggested feature.)
If there isn't a way of doing this... it wold be really nice :)
Thanks for all your good work!

@stale stale bot added the wontfix label Jun 17, 2020
@stale stale bot closed this as completed Jun 24, 2020
@klemens-st klemens-st removed the wontfix label Dec 8, 2021
Repository owner deleted a comment from stale bot Dec 8, 2021
@klemens-st klemens-st reopened this Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants