2
votes
1answer
173 views

Custom Field sort not working (WP 3.8.1)

I am trying to sort a custom wp_query using the date format YYYYMMDD (php: date('Ymd') ). This will not be regarded as date field, but rather as a numeric one stored in custom field. My WP-QUERY code ...
0
votes
3answers
49 views

Comparing Dates from custom field

I am trying to compare dates from a custom field. I have them stored as something like "20121125". If the date has expired, a placeholder image will be used, if not, the default thumbnail will be ...
0
votes
1answer
127 views

Compare WP Custom Field date

I had create a custom field "date" with this format 16/09/2013 (d/m/Y). How can i compare date and show only post with date from today ? This is my query that don't work !! $args = array( ...
2
votes
2answers
138 views

Date, Time, and Timezones

I am a bit confused about using dates/times along with timezones in WordPress. I have the following questions: What is the purpose of the timezone setting in the Admin -> Settings section? Assume ...
0
votes
1answer
111 views

How do I convert all custom_field php timestamps in the database to js timestamps?

For the past year, we've been storing date-time values into a custom field _date using strtotime(). There are about 100 PHP date-time stamps in our database from over the past year. I would really ...
3
votes
1answer
820 views

Formatting custom meta box date from YYYY/MM/DD to a more readable alternative

QUESTION This is following a previous question that was graciously answered by Milo earlier here - How to sort CPT by custom meta value (date), and return posts month by month In short, I'm having ...
1
vote
1answer
143 views

Displaying custom field according to date

I am not sure whether this is an Advanced Custom Fields-related question, or a general PHP question, so I have also posted this to the ACF support forum, for those of you who are also looking for ...
1
vote
1answer
130 views

Show 1 post and after a specific date show the next one

I used the following query to have only 1 post published on the homepage from a particular category: <?php if ( have_posts() ) : ?> <?php ...
0
votes
1answer
110 views

How to show certain data on certain interval of period

I have three sets of period of time, each with several interval of date: Event A Jan 1 - March 1 Dec 1 - Dec 31 Event B Mar 2 - April 15 Jun 1 - Jul 15 Sept 1 - Oct 15 Event C Apr 16 - May 31 Jul ...
4
votes
4answers
5k views

Sorting a query by custom field date

EDIT: Reworded the question for more clarity I'm trying to sort by custom meta box data, which I am converting to a date using the strtotime function, but I'm having some difficulty. My chief ...
2
votes
1answer
944 views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
2
votes
1answer
1k views

custom field value date convert to unix timestamp problems

For some reason, I'm having difficulty converting a date value stored in a meta field to a unix timestamp (and back again). If I save the date as a string it all works fine, but if I convert it to a ...
0
votes
2answers
2k views

converting custom field date format

I am using the More Fields plugin which gives me the ability to create a date formatted YYYY/mm/dd and I want to convert that to be shown like: February 11, 2011 Is this possible?
3
votes
2answers
7k views

Convert jQuery Datepicker Format to SQL Date Format

I set the jQuery Datepicker format to D d.m. displayed as Th 3.3. for a custom meta field that I want to use to sort posts. In SQL, the custom meta field is saved as D d.m. I would like to display ...
0
votes
2answers
922 views

wp custom field date format compare

How do I possible to work with this code to work with date format Y-n-j Value start_date = 2011-1-20 end_date = 2011-1-30 Here are the original function came from this Query between two meta ...
0
votes
2answers
532 views

Custom Field Date Problem

I have a custom field called expiry_date with a value of let's say 2010-12-11 00:00:00. What I would like to do is, in my query loop, only return posts with this expiry_date custom field attached to ...