The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
13 views

WP_Query with UNIX timestamp in meta query

now idea why this isn't working, please point me in the right direction! Here's my main query; $events = new WP_Query( array( 'posts_per_page' => -1, 'meta_query' => array( ...
0
votes
1answer
30 views

Getting timestamp of activation plugin time

I want to save the time that the user activates a plugin. So I need to set the value within the function that the registration hook fires: function ucme_reg_func () { //------------other ...
0
votes
2answers
51 views

Individually styling date month year [closed]

I am using underscore_s barebone theme to build mine and came across this challenge that I would like to style date month and year separately with CSS and the code output puts them together. I dug ...
0
votes
1answer
77 views

Relative time - how to calculate difference beween post publish date and current time

I want to calculate the difference between post's publishing time and current time, and I want to read that value as a number (number of hours, minutes, seconds whatever, i just want it to be a ...
0
votes
0answers
27 views

How to display time when page is created and edited

On posts I use this: Time created <?php the_time('Y-m-d'); ?> Edited (updated) <?php the_modified_time('Y-m-d'); ?> It works fine on posts, but on page template it displays just ...
0
votes
1answer
103 views

Selecting posts older than the current Unix epoch timestamp

I am trying to perform the following query, which originates by the fact the post's 'date' and 'time' are entered as separate custom fields. $args = array( 'post_type' => ...
1
vote
1answer
23 views

Swatch Internet Time for article timestamps

The date and time when the article was published is shown below the article title. How do I show Swatch Internet Time there instead of local time?
0
votes
1answer
51 views

Convert all dates in field to Unix time, except those already in Unix time

I have a meta field that is mixed with MM/dd/yy hh:mm dates and Unix timestamp dates. How do I convert all of the MM/dd/yy hh:mm dates in the db to Unix? I have only limited PHP and SQL knowledge so ...
1
vote
1answer
63 views

Calling Different Custom Post Timestamps in a table

I use WordPress to run an events site that people can sign down to if they have a subscription. At the bottom of each event, if you are admin you can see a guest list with Name, Email, Tel, Avatar ...
0
votes
0answers
62 views

Timestamp translation is not working with buddypress and wordpress

I would like to change the timestamp of activities to another language. Example : member joined group A since 2 hours the part that should be translated in my question is hours. I tried many ...
0
votes
2answers
151 views

How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp

This is somewhat of a continued problem from another question that I had asked. Here is the original post. pre_get_post filter returns results when there should not be Since then I added an orderby ...
0
votes
1answer
350 views

Time sort with meta_key using UNIX timestamp failing due to date differences

I'm dealing with the following issue trying to sort a custom post type by a meta key created using the Advanced Custom Fields plugin Date and Time Picker add-on. The add-on creates a jQuery datepicker ...
0
votes
2answers
74 views

Custom time field won't sort regardless of format

I'm using a custom fields plugin for WordPress (Advanced Custom Fields) and am using a time picker field set to format: "h:mm tt". Using a typical WP query, I'm attempting to sort by "start time" in ...
0
votes
1answer
467 views

WP Cron job every 1st and 15th of the month

Trying to set up custom schedules for WP Cron, knowing that they use an interval is it even possible to set up a cron job for every first of the month? As well as every fifteenth. This is what I have ...
2
votes
2answers
182 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
23 views

If I change the taxonomy of a post will it get a new time stamp?

I have a category called feature that displays the latest post, but further down the line if the user wants to make an older post a featured post, it doesn't currently work. Using the time stamp would ...
0
votes
2answers
591 views

current_time('timestamp') seems to be different from the real current time

Does current_time('timestamp') have an issue? I am trying to get the current_time('timestamp'), and instead of giving me my current time: Jun 26 2013 14:30 It gives me: Jun 26 2013 21:30 I ...
0
votes
1answer
72 views

How to change post date only 1 time a day?

I have this code is_admin() or add_action( 'the_post', function( $post ) { if ( ! is_singular() or ! is_main_query() ) return; $post->post_date = current_time( 'mysql' ); ...
0
votes
1answer
73 views

Auto update date time 1 times per day?

How to update automatically date time of page to current time only 1 time per day? Example: I write a post on May 28, 2013. And if today is June 9, it will change may 28 to June 9. And if today is ...
0
votes
1answer
31 views

Make datestamp for status updates show time

I have an installation of Wordpress 3.6 running on my server. Playing around with it, I found that 'status updates' don't show the time posted: Here's the thing: I want the time there too. ...
0
votes
2answers
239 views

Integrating Human Time Difference and Traditional Timestamps?

My goal is to use human_time_diff only when the post was added on the current day. When it wasn't, I would like to revert to the traditional timestamp (the second code). I'm unsure how this would be ...
-3
votes
2answers
242 views

Datetime on time tag wordpress puts it outside the tag

I want to use a time tag with the datetime attribute in it... I tried this in functions.php: <time class="time" datetime='. the_date('d-m-Y') . '>%3$s '.get_the_time( $d, $post ...
0
votes
1answer
61 views

Where does the time get pulled from in the_time()

I am currently using the following function in my footer <?php the_time( 'Y' ); ?> But the footer keeps showing 2011, instead of 2013. So where does this time stamp get called from exactly?
0
votes
0answers
145 views

Using strtotime() and update_post_meta not saving

I would like to take a date entered in a meta box field, & convert it into a Unix timestamp (dd/mm/yyyy) and save it in the wp_postmeta table. But my code isn't working: function ...
0
votes
1answer
294 views

admin end post published time display not working correctly

I have the inconsistency in post published time. For example, as I published a post on April 20nd 9pm and it is April 20nd 9:30, wordpress shows it is published one minute ago in the admin end. Also ...
1
vote
1answer
398 views

How to add a new meta key and assign timestamp to posts

I've been trying to look for a way to create a loop in my website and show posts being read/watched but have not found anything. The only way I can accomplish this would be to create a new meta key ...
0
votes
1answer
325 views

Register script/style: Is it possible to customize the version query string via plugin?

Expanding on the question in the title: I would like to find a way (via a plugin) to use timestamps for the JS and CSS file version query strings that are output with wp_register_style and ...
4
votes
1answer
385 views

When does next Cron Job run (time from now)?

I would need to know how much time is left between now and the next time a specifc Cron Job is done. For another answer I built a basic cron inspector plugin which can be found here. Reason I'm ...
0
votes
1answer
451 views

datetime picker, timestamps and meta queries

I have a custom meta box with a datepicker. The datepicker outputs 2013-01-17 10:00 in my database for an event that is 01-17-2013 at 10pm PST. $eventlist = new WP_Query(array( 'post_type' => ...
0
votes
1answer
115 views

Getting post by specific date in Advance Custom Field

How can i get movies there are today in cinema, for example my code display the movies in time that shoud apear 16 January,17 January..., how can i display only the movies in this day. Ex: today is ...
0
votes
2answers
72 views

How to get movies by date

Ola, i am building a complex cinema site, and i want to get movies by date Ex: The movies are aded trought post type, I have a custom field name date. How can i retrive the Movie that shoud play ...
2
votes
1answer
131 views

Query by custom dates in UNIX Time

I actually have a custom date registered in UNIX Time in my database like this: meta_key : custom_date meta_value : 1322697600 and the type of the meta key is a longtext I would like to retrieve ...
0
votes
2answers
530 views

How to allow registered users to submit the form only 5 times per day?

Question Is there a way that my registered users (if they are not the form is hidden so I don't need that) are restricted to submit the form more than 5 times per day, or 20 per month or whatever ...
1
vote
1answer
265 views

Finding difference in days

I want to store the current time using the update_option and then compare it if the set time was 3 days ago. I want to know in what format I should store the time? and then how can I compare it with ...
3
votes
1answer
580 views

Is it safe to use 'date_default_timezone_set' in plugin file?

I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT. Temporarily, until the plugin developer fixes it, I need to ...
2
votes
3answers
2k views

Why time functions show invalid time zone when using 'c' time format?

These are the functions I use in my theme to display the "entry-meta" which includes published and last modified dates (among others) of an article: // Shows Author and Published Date if ( ! ...
3
votes
1answer
169 views

Add 20yrs to post date, and then query

I would like to know if anyone knows a way of adding a timeframe (say 20 years) to the datestamp on a set of posts, and then running a query on the loop which uses the new date? Basically what I want ...
0
votes
2answers
760 views

how to compare different timestamps in wp-query for events custom post types?

I have a custom post type with custom metaboxes (as seen on wptheming.com) and would like to make a query to show upcoming events, say in the sidebar, where past dates are left out. But I need a ...
0
votes
1answer
796 views

Time & Date on Post - Time Ago Custom Function

I'm using the following custom function to display the timestamp for a post as posted "X minutes ago" or "X days ago" for 14 days and then this changes to the actual date (e.g. 17th December 2010): ...
0
votes
2answers
509 views

Human time difference in months instead of days. How?

I use the following code in my template. <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago'; ?> It shows like 2 days ago, 20 days ago, 90 days ago. Is there a ...
2
votes
3answers
1k views

How can i put "posted x minutes ago on my posts?

wordpress by default writes the the date on posts, but how can I transform it to : "x" time ago ?? like 3 days ago, or 5 minutes ago ??
0
votes
1answer
573 views

Display upcoming events in the next 30 days by querying posts with timestamp in custom meta

I have a custom post type "event" which stores a custom meta as a timestamp ($event_date). The date is always in a dd-mm-yyyy format, so I can generate a unix timestamp from this key. The timestamp ...
0
votes
1answer
50 views

Why am I seeing 'true' next to these timestamps?

Click on the Beers tab on this page: http://beernews.org/brewery/sierra-nevada-brewing/ UPDATE: Here is the Pastebin for Excerpt.php. Note that excerpt.php is called in other places on the site (like ...
0
votes
1answer
95 views

What function changes a post's timestamp?

What function changes a post's timestamp? I created a post from frontend script, but I need to add a date picker to set the date of the visit.
0
votes
3answers
476 views

Get timestamp of latest post in C#

Is there a way to get the timestamp of the latest post in C#/.net? I am writing a control in ASP.NET for a intranet, which will alert users when a new post is posted in a wordpress blog.
0
votes
1answer
733 views

Save metadata as a timestamp, display as a “pretty” date

I have a custom meta box, its just a straight-up text field, for an event date, formatted: YYYY/MM/DD ...I'd like to save that as a date stamp (so i can sort by event date), and display just the ...
3
votes
1answer
1k views

Modify human_time_diff() to shorten “days” to “d” and “hours” to “h” etc

I'm using the function echo time_ago() that displays the time like this: 5 days ago what's the best way to change it to 5d ago ? My research led me to human_time_diff() function located in ...
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 ...
1
vote
2answers
2k views

wp_schedule_event will it run if timestamp has passed?

I've been told by my clients that scheduled jobs are not run some times as expected. I never questioned myself about how wp_cron actually works, I thought it was kinda self-explanatory. But now I ...
1
vote
1answer
1k views

timestamp and scheduled post irregularities

Update: I've confirmed the problem (that scheduled posts are based on UTC time), now just need advice and background to determine best solution. Questions: 1) how WP determines UTC time before ...