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

New attempt at fixing sort on meta field #16

Closed
wants to merge 1 commit into from
Closed

New attempt at fixing sort on meta field #16

wants to merge 1 commit into from

Conversation

perifer
Copy link
Contributor

@perifer perifer commented Jan 27, 2017

This does the sort as described in https://www.advancedcustomfields.com/resources/orde-posts-by-custom-fields/

$query->set('orderby', 'meta_value');	
$query->set('meta_key', 'start_date');	 

I don't know what $metaQuery did before. It is remove in this commit.

I also change the logic around _meta_key_ check. This now checks that it is a prefix, not just part of the string. I think that is more correct.

@perifer
Copy link
Contributor Author

perifer commented Jan 31, 2017

Let me know if I can do anything to get this in a tagged release.

@perifer
Copy link
Contributor Author

perifer commented Mar 15, 2017

Let me know if I can do anything to get this in a tagged release. The functionality should be identical to the one that was merged into Municipio some time ago.

@sebastianthulin
Copy link
Member

Conclusion: Will cause issues with NULL meta (posts will not show).

@perifer perifer mentioned this pull request May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants