Add date_query support #77
… helper function, be_sanitize_date_time(), to DRY-up sanitization of date and time strings.
… the simplifcation change two commits ago.
…imes. This opens the door to using 'relative' date and time formats such as 'Wednesday August 6' with the year implied instead of something like '2014-08-06'.
…defined in the beginning.
…r whether the calling argument check can accept a string. This would only work as a fallback for the 'date', 'date_query_before' or 'date_query_after' attributes. The 'date' argument simply serves as a quick shortcut to defining the 'year', 'month', and 'day' arguments for any given date_query array.
…faults as they fallback to the values of the global 'column' and 'compare' arguments in WP_Date_Query.
I'm a little on the fence about the attribute naming. It's clear there needs to be a logical division between the top-level and second-level attributes, though things could easily get pretty long once you start thinking about 1) using multiple date query attributes in a single shortcode 2) eventually incrementing those attributes for multiple date queries.
In the vein of multiple queries, we could probably forgo introducing the second-level
"phase 2" would then introduce
Something to think about.
…ain -. Kind of a weird way to go about it but the explode needs the hyphen to proceed.
I got syntax errors from the variables defined within an if statement. Ex: https://github.com/DrewAPicture/display-posts-shortcode/blob/datequery/display-posts-shortcode.php#L164 Breaking it apart into $variable = whatever; if ( ! empty( $variable ) ) fixed it for me.
But other than that, it worked great!
I have applied in this date code in the following way
[display-posts date="today" category="Dawn" no_posts_message="No Job Published in Dawn Newspapers Today." posts_per_page="150"]
but this is not working so I have applied the following as usual
[display-posts date="2018-12-12" category="Dawn" no_posts_message="No Job Published in Dawn Newspapers Today." posts_per_page="150"]
I am using IsleMag theme and This plugin has not been tested with version of WordPress.
Plz spend your precious time for this issue. And tell me how to fix it....
I have applied the following code and see the result in attached picture
I'm using your plugin (thank you!!) and implemented it as follows:
etc etc, hoping that i would get a list of posts for every day of the week.
The problem is, that during the day some posts move to the column of the previous day (rather than wait until 0:00h).
Do you have any idea what causes this behaviour? If so, is there a solution for it?
Thanks in advance!