The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
46 views

Last three posts not being put in order by date. How to fix this?

My company adds a quote of the day each day. The last three posts that I have put are not in order though. The first quote I posted 3 days ago is at the top the post I posted yesterday is under that, ...
1
vote
1answer
240 views

Date calculations from 2 custom fields

We are struggling to find a way to calculate a time difference between two dates saved as custom fields on WP. We are actually using two different plugins: a) Easy Content Types b) Advanced post ...
2
votes
0answers
1k views

query_posts with a custom post type, a meta_query and sorting by post date?

I've searched the archives and found questions similar to what I need, but haven't found exactly what I want. I've got a bunch of products that are sorted by a meta_key of country, and I'd like to be ...
1
vote
1answer
571 views

XML-RPC and post_date

I'm trying to set the post_date via XML-RPC and keep getting an error saying the XML isn't formatted properly. The code goes something like: $post = get_post( $post_id ); $response = ...
0
votes
2answers
81 views

Wrong user registration date in wordpress

I have this funny problem and I'm not able to locate where it happens. The problem is when a user registers on my site his/her registration date is wrong (not just wrong but total rubbish, even if I ...
1
vote
2answers
217 views

How to split <p> text text text </p> into array

I like to output and style in a shortcode, but the content that is get is the content of a page, so it's style like that <p>2012-12-12</p> <p>2012-6-23</p> ...
2
votes
1answer
227 views

Exclude Duplicate Posts in this SELECT Query

I have this custom select query that pulls a specified number of posts from a specific category and displays them in the order of the latest comments. The problem is that if a post has both of the ...
0
votes
1answer
130 views

How to change text (date) in post base on the day

So the question seem unclear, i rewrite it to hope for the best and get some great ideas. I write a WordPress Sticky post (always first on top). In that post text there is something written like : ...
0
votes
1answer
60 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 ...
5
votes
4answers
160 views

Display a post's publish date from 2112

So I am making a news website about the future, 2112 to be specific (hello, critics). I wanted to display a post's date to be from 2112. But when I try to do this from the admin panel, it 'schedules' ...
0
votes
1answer
60 views

Meta query stopped working

The following query stopped working all of a sudden and I can't figure out why. <?php $today = date("Y/m/j"); query_posts(array( 'post_type' => array('events'), 'meta_key' => ...
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 ...
4
votes
1answer
67 views

Uploading DB to server from local is not matching the post dates

I just created a custom WP CMS and am having trouble with the custom post maintaining the correct order on the front-end. In the back end the date order is correct but is not being reflected on the ...
1
vote
1answer
80 views

Sorting a query Field by date

I have my site, which at the moment is display university open-days, at the moment they are sorting by order of page title, when actually I would prefer they sorted in order of date, soonest first, ...
0
votes
1answer
1k views

Order by custom field date with ASC order

I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC. Basically it's a query that should list posts where the custom ...
3
votes
1answer
168 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
1answer
133 views

Get_the_date doesnt show todays date [closed]

I tried the_date, the_time and get_the_date to show todays date on the website. But wordpress takes latest post's date and publishes it. For example on the index page if the latest post was posted on ...
0
votes
1answer
315 views

Saving Revision of post meta key/value on each update_post_meta event

I have some code that updates a meta-key's value by incrementing... $post_id = $wpdb->get_var( $query ); $meta = get_post_meta( $post_id, 'stuff', TRUE ); $meta++; ...
1
vote
1answer
446 views

WP_Query() show posts that end later than today

I have a query as follows: $wp_query = new WP_Query( 'meta_key' => 'end_date', 'meta_value' => 'today', 'meta_compare' => '>=', 'post_type=vehicle' ); I want to show only those posts of ...
1
vote
1answer
354 views

Schedule event every second thursday of the month

I'm working on an email system and they want it automated to send out emails every second thursday of the month. I've got the PHP sorted out and ready to fire a callback to send the emails, but I'm a ...
0
votes
1answer
112 views

Date based CSS/theme

Is it possible to set a CSS stylesheet or a theme for articles that were published before X date? The reason I ask is that we've just redesigned our website and some pages have images that are wider ...
0
votes
1answer
281 views

In wp_list_comments comment dates won't work?

I'm trying to create my first comments list and comment form in my wordpress site but the dates are displayed as %e %B %Y at %H:%M instead of the date. It seems like the date format isn't recognized. ...
4
votes
1answer
78 views

Page permalink conflict with Date

I need to access a page which is name 2011. The trouble is that WP thinks that I am trying to read the 2011 posts of my blog. The only way I can make it work for the moment, is to change the ...
3
votes
1answer
73 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
497 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
2answers
429 views

Check post_date in pre_get_posts

I want to change the order of a feed using pre_get_posts filter. But I want to exclude dates older than today. I see how one could do that if the date were in a meta key, but the date is in ...
0
votes
1answer
91 views

Changing date query from month

I have been perfecting this bit of code below and ran into an issue. I was wondering how I can change the following code so that it will so the anniversary of any user in the next 30 days, not just by ...
-1
votes
2answers
409 views

the_time() cannot be placed correctly

I want to use the following code the_time('d. F Y', '<p class="article-date">', '</p>'); to show the date of an article (post) wrapped within <p></p>. I also tried echo ...
0
votes
1answer
439 views

Localized Date Format for Custom Field

I'm using a custom field, formatted with "dd-mm-yyyy". I would like to use it with the Date Format defined in the Dashboard settings. It seems alright in English with get_option('date_format'); Or ...
0
votes
1answer
5k views

How to get posts published between a date and today?

Is it a way to get posts published between a date and today with query_posts() ? Example : All posts published since 2012-04-01 Thanks EDIT : How to add the filter date on this Query Posts ? ...
2
votes
1answer
471 views

How can I query all users who registered today?

I'm trying to use meta_query to return all users that have registered today : $args = array( 'meta_query' => array( array( 'key' => 'user_registered', ...
2
votes
1answer
298 views

How Do I Make WordPress Run an Event Every Day?

In a plugin I want to build, it deals with contests. A contest has a date on it. Does WordPress have a feature in it where it can run a piece of code every day without requiring someone to create a ...
0
votes
2answers
428 views

Post timeline (pagination with date, not numbers)

I'm pretty lost... I'm hoping someone can lead me onto the right track! I'm trying to achieve the effect of a post timeline, by paginating the posts (1 per page) and rather than displaying the pages ...
-1
votes
1answer
722 views

Convert WordPress date format to jQuery UI Datepicker format

I wrote the following function to convert the current WordPress date format into a format that can be recognized by the jQuery UI Datepicker: From: http://codex.wordpress.org/Formatting_Date_and_Time ...
0
votes
1answer
100 views

How to display a certain template element only for posts published within certain time range?

I recently migrated a blog from sub.domain.com to blogs.domain.com/sub/. Because I'm using Facebook comments, all the posts published before April 25 need to reference sub.domain.com/blog-entry-title ...
0
votes
1answer
519 views

Displaying posts with only upcoming dates according their custom field date value

I got posts that have starting date as a custom field value. I'm displaying few of those posts in my sidebar in ascending order so that the post with closest starting date is shown first. This is what ...
0
votes
1answer
43 views

featuring old articles without messing up with the archive

This is all about featuring content in WP. Say, you got 1000's of posts that you accumulated over the years and each has their own original ( and true ) post dates. And now you want to feature them ...
6
votes
1answer
993 views

The purpose of the post_date_gmt?

Why do we have 2 date fields in the wp_posts? What's the purpose of the post_date_gmt? When does storing the greenwich time get handy?
0
votes
1answer
59 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 ...
3
votes
1answer
440 views

Post date vs. event date in Wordpress

If I'm creating a WordPress site, what should I do when I have a blog that manages events to keep date events? For instance, in my own case, I'm making a travel blog where some histories have a real ...
0
votes
2answers
900 views

Using global $post; with custom post types

I'm working on creating a notification that will indicate when a post is less than a few days old. This is specifically for a custom post type called "news". Is there a way to use global $post; with ...
0
votes
1answer
343 views

Arrange Posts By Date In Order Of Closest To The Current Date

I have a list of events on a clients website that show in a sidebar. When viewing the homepage you see one event and if you're anywhere else on the site you see two events in the sidebar. I am ...
0
votes
1answer
74 views

Looking for a filter to modify the months

Hi making a simple plugin that replaces the wrong russian month with the right ones. But I can't find any filters that works. I have tried these filters without success: ...
-2
votes
1answer
220 views

Can a scrollable date picker be done in Wordpress for archives?

I've been asked by a client to do this: But I have no idea how I would go about it, particularly in Wordpress. I searched around Google a bit, but it looks like this design was just lifted from an ...
-2
votes
1answer
48 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
2answers
350 views

wordpress showing all posts instead of date range

When going to http://craigmdennis.com/articles/ Wordpress uses the index.php template. When you go to http://craigmdennis.com/2010/05/ Wordpress uses the same template (markup below) but shows the ...
0
votes
1answer
121 views

Date archive permalinks for custom taxonomy

Is it possible to have date based permalinks for a custom taxonomy? ie http://www.blah.com/taxonomy/taxonomy-term/2011/08/08 TIA! d.
1
vote
1answer
102 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 ...
0
votes
1answer
655 views

Group posts by date with a list

I want to set a group of posts grouped by date as a list. Below is what I would like to have: Day... <ul> <li><a href="#">Lorem ipsum</a></li> </ul> Previous ...
1
vote
1answer
703 views

Check if date of post is yesterday

In a loop, I want to display "Yesterday" if the date of the post(s) are dated from yesterday... So here it goes: <?php if( date('Yz') == get_the_time('Yz') ) { echo 'Today'; } ...