0
votes
2answers
43 views

Change the date and time in wordpress

Is there a way to change the date and time in WordPress, not the timezone, but the date and time all together, like make it 03-21-85 11:11 PM. I want all dates and times to be changed, not just to one ...
0
votes
3answers
42 views

Show different time stamp based on time

What's the best way to show a time stamp based on different times? For example: if a post is under 24 hours, show %% mins/hours ago. If a post is over 24 hours, show month/day/time. If a post if over ...
0
votes
1answer
79 views

Date is wrong on 'all posts' page

The website i'm working on has a homepage with posts and at the end of the page a button with view more posts. When I click that button it sends me to 'all posts'. On this page I have a problem, the ...
1
vote
1answer
172 views

Advanced custom fields: Customise date picker's start date (need to choose year 1500 onwards) [closed]

In Advanced custom fields, I would like to customise the date picker so that, ideally, I can only select a year in the 1500s/1600s but at the very least allow the datepicker to go back to the 1500s. ...
1
vote
1answer
67 views

How to get date using timezone saved in options? [duplicate]

This code does not work correctly and returns time using timezone from computer and ignoring timezone stored in WordPress options: date_default_timezone_set( get_option( 'timezone_string' ) ); $hours ...
0
votes
2answers
133 views

How can I show many posts an author has per week?

I've searched around and have had no luck or success in finding a way to show how many posts an author has made in a certain period of time (e.g. - a week) Any ideas on how one would approach this? I ...
1
vote
1answer
143 views

Wordpress Custom Query to show posts from last x years

I have found a way to show all posts from the current year with this code: <?php $today = getdate(); $lastyear = $today[ 'year' ]; $args = array( //'nopaging' => true, 'paged' => ...
0
votes
2answers
107 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 ...
12
votes
2answers
323 views

Unable to select an old date in wordpress

I am unable to set the year below 1899 for a post. If i set year below 1899 it is set to the current year automatically. I have purchased the Timeline theme and asked in their support forum. They ...
2
votes
2answers
131 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 ...
1
vote
1answer
207 views

If modified on same day, show only time

I have a date on each post and comment which shows the date of placement. If I edit it, it shows me the date of the post and the modified date. That's fine, but now, I want to show only the post date ...
0
votes
2answers
127 views

Copyright: Get first and last date of post type

I was searching for the easiest/fastest way to get the accurate date range for copyright notices in the footer. The copyright notice shouldn't only contain the year, but as well take month and day ...
2
votes
2answers
96 views

Unable to set right time in admin and frontend template

When I run a simple php file called test.php (placed in the root of the wp installation) that contains something like that: <?php echo date('H:i:s'); ?> The result is right: 15:30:00 and the ...
0
votes
1answer
52 views

Format Date for Manual Insertion into post

I have the following $mydate = "26 January, 2012, 5:05 AM"; I want to format this date properly so I can insert it into a post_date. Is there a simple way to do it? $post_ information = array ( ...
2
votes
5answers
1k views

Get date of last update outside of loop

I'm trying to figure out how to display the date that a post was last updated outside of the loop. I'm able to display the published date using get_the_time() but there doesn't seem to be a "loopless" ...
0
votes
2answers
7k views

How to get date for each post?

while (have_posts()) : the_post(); //some html <li class="icon-date"><?php the_date('Y-m-d');?></li> <li class="icon-time"><?php the_date('H:i:s');?></li> With ...
0
votes
1answer
2k views

Advanced Custom Fields and date picker, show posts only if the day is today no matter the year

I've created a site made just with custom fields about famous people in sport. In the post page I've a born date and a death date field using the data picker. What I'm trying to achieve is to show ...
0
votes
1answer
69 views

How can I compare publish and update dates for a single post?

In my theme, I'd like to display the publish date and (only) if the post was updated after the publish date, also display the updated date. The code in my theme now looks like this: */ stuff above ...
0
votes
1answer
54 views

Randomizing Post Links Outside of Loop - No Author or Date

I'm developing a home page that is a mishmash of a bunch of information, including a random smattering of several categories, including blog posts (category 192 in the code below) I'm obviously not ...
0
votes
1answer
380 views

Get date function not working

I have a function to get the date. I have input fields and want the date in this fields. But my code is set a wrong date. I set the date in Wordpress settings and on my server. But it is not working. ...
3
votes
1answer
74 views

How to display date such “x ago”

I want display date based on how much time has passed since, i. e. Posted 12 minutes ago
-1
votes
1answer
607 views

Separately formatting date elements

I am trying to achieve the following look in the time format: I have for now several issues, First is that the month and year are not displayed at all, I use <?php the_date('D'); ?> <?php ...
0
votes
1answer
60 views

Comment time is same as the post time

Here is my comments.php: http://pastebin.com/E5bz4aaW The problem is that the threaded comment (the reply) showing my post date instead if the comment date. I checked in the database and it looks ...
-2
votes
1answer
49 views

Display the last date, regardless of articles

i would like to display a date on my Blog. I have used this Code for displaying the date: <?php the_time('l, j. F Y'); ?> But that uses the time of the latest article. How can i display the ...
0
votes
1answer
751 views

Media attachment date and post date

I have just migrated a massive site (2500+ users, 5000+ posts/images) to Wordpress using custom code. Basically every post has one image and that image is attached to the post as the featured image, ...
1
vote
1answer
112 views

Calculate future date

I want to calculate a future date based on the date the post is published and use it in the content of a post. I can echo the post publication date using: echo the_date('Y-m-d'); How can I ...