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

Can't order posts correctly, because saving as timestamp doesn't work! #93

Open
der-lukas opened this issue Jul 22, 2015 · 0 comments
Open

Comments

@der-lukas
Copy link

Hey!

I'm running WP 4.2.2, ACF 4.4.2 and the latest version of acf-field-date-time-picker.
Your plugin doesn't work when I'm trying to save the values as timestamps. Now I chose to save the values as strings, but this makes a problem with ordering my posts in WP Query, as you can see in this image:

http://i.imgur.com/NbeeVEp.png?1

The last of the three entries ("Bananaboat") has an earlier start-time as the once before, so it should be on top of the other two posts.

My Field Settings look like this:

http://i.imgur.com/smNEFsu.png?1

.. and my WP-Query Arguments:

$args = array (
        'post_type'              => 'event',
        'post_status'            => 'publish',
        'orderby'                => 'meta_value',
        'meta_key'               => 'von',
        'order'                  => 'ASC',
        'posts_per_page'         => -1,
);

("von" is the field name of the date-time-picker-field)

But as the value is not saved as a timestamp, it seems to have issues ordering the posts correctly...

Do you have any idea how I could go about solving this problem? I'm a little under pressure with a deadline coming up... -.-

All the best,
Lukas

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

No branches or pull requests

1 participant