-
Notifications
You must be signed in to change notification settings - Fork 10
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
Sort on meta field #15
Comments
I created two pull request for this issue: |
helsingborg-stad/Municipio#18 is merged. I think the meta_query might be behave differently with posts that don't have the meta field, compared to using the simpler
I think the simpler approach might exclude posts that don't have the meta field. Needs testing though. And not sure if it's a problem with this use-case. |
Is there any reason this hasn't been merged? This should be the same approach as in helsingborg-stad/Municipio#18 (which is merged). |
This has not been merged yet due to lack of documentation about the solution. What are the effects of the change and why does i work? |
Are we talking about #16 now? That PR makes it possible to use meta field in e.g the post module for sorting posts. This does not work without this fix. |
Also see #16 (comment) |
FYI I've currently postsponed work on this since I don't think we will need this fix when we are using your new event solution. |
I continue to have issues when trying to sort on a meta field in the posts module. This is what I have found so far:
Sorting on fields except meta fields seems to work.
Sorting on any meta fields seems to use post_date.
This is what I get with wp debug bar with
define('SAVEQUERIES', true);
set when sorting on a meta filed called event_place:Notice that it seems to know about event_place but still sorts on post_date. This is what
var_dump($getPostsArgs);
gives inPosts.php
:It might not be related but I think it might be something similair on the archive page which also have a settings to sort on meta fields.
The text was updated successfully, but these errors were encountered: