The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
68 views

Display Today's date outside the loop?

Is there any way to display the Today's date outside any loop/post using WordPress date/time function instead of using the PHP date() function? I'm using the PHP date() function but it does not ...
0
votes
1answer
2k views

How to get date of post when using wp_get_recent_posts()?

I get the latest posts this way: $args = array( 'numberposts' => '2' ); $recent_posts = wp_get_recent_posts( $args ); Then I loop through them and get information about the post this way: ...
4
votes
2answers
197 views

Rearranging posts based on categories

Hey everyone on Stackexchange! I'm trying to find a way to prioritize posts based on a category in a loop, which is sorted by dates. All posts are grouped under their respective dates. The date ...
4
votes
1answer
106 views

Metabox date month number to word

I use custom metabox with date (day, month and year). The problem is when I try to transform date number to date word - for example 10 to be October. I use this code: function ...
0
votes
2answers
107 views

Date comparison : which date format?

I have a CPT for events. I need to display future events for people to register, while hiding past events. What is the easiest date format for both (1) entering date when creating new event and (2) ...
3
votes
2answers
1k views

How to order posts of a custom post type by date DESC in dashboard Admin?

I created a new post type named "Video". When I create post for the post type, posts is ordered by title ASC. Is it possible to order posts by date DESC please ? register_post_type('Videos', ...
0
votes
1answer
311 views

How to get posts published on the latest date?

Is there a way of getting all posts published on the latest date? It might not necessarily be today, it might be yesterday or the day before yesterday or even a day last week.
1
vote
2answers
150 views

Display commenter's registration date on comments?

Is there any way to display a user's (registered) registration date on the comment. Lets say i have a written an article, registered users A, B, C and D left a comment on my article. I can display ...
1
vote
1answer
412 views

After wp_insert_post(), date_i18n() and date() outputs are adjusted to GMT

I am having a very peculiar issue on a customer's server (vps). The code below works just fine on my servers. Basically, a specific unix timestamp is formatted correctly and as soon as ...
10
votes
2answers
334 views

Set post date before 1970

I have a custom post type called books. The books publication date is from between 1700 and 1900. I want to set the post date to these dates(so i can query the results sorted by year) but i can't ...
0
votes
1answer
848 views

Order by custom field date?

I've created a category "Expire Soon" and i want to insert and sort the posts by custom field "expiration_date". I use this code but the posts are sorted by custom field "expiration_date" but not by ...
0
votes
1answer
1k views

show User Registration Date in Wordpress

i want to show user registration date like Member since: 15,dec 2012. I have a code <?php echo date("M Y", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?> but it show ...
1
vote
1answer
250 views

Arrange posts by date in front page

I have code to show the 5 last posts from every category on the front page. However, at the moment they are ordered category by category. Is it possible to order them by post date, but still have 5 ...
0
votes
1answer
757 views

Display posts where date field matches current month?

I have a loop which displays all the posts of the "events" post type on my site. Each of these posts has a custom date field "event_date", which I sort the display of the loop by. I would like to ...
1
vote
1answer
158 views

Escaping date string in url with wordpress

I am creating a Wordpress page that searches through posts based on a date variable that is set through a _GET variable. I want to make sure that I am doing this in the best way possible and that I ...
1
vote
1answer
722 views

Archive listing of posts by publish year (multiple years)

I have an archive page showing all blog posts (in a specific category). With a growing number of posts, I want to separate these by publish year. For example (simplified), I'd like the following: ...
0
votes
1answer
292 views

Set a custom post type's title and slug to match the current date

I have seen similar questions asked, but mine is a little different. I want to register a post type called 'minutes' that doesn't allow you to add a title or a slug, but when you publish (or autosave) ...
1
vote
2answers
180 views

Displaying Archives List

I'm displaying list or archives using <?php get_archives('monthly', '', 'html', '', '', FALSE); ?> and my list displays December 2012 November 2012 etc However I would like to format ...
1
vote
1answer
29 views

date issue with category post retrival

I am trying to retrieve all posts from an rss feed from a category, and I have working code that does this. However, on one category I will only get all posts until a certain date. Any post prior to ...
0
votes
2answers
546 views

Comparing dates in custom field

I have a function which should return the future event date: function get_upcoming_exercises( $limit = -1 ) { $args = array( 'post_type' => 'px_event', 'posts_per_page' ...
0
votes
1answer
152 views

Restrict query to last day with posts

I am using the Delicacy theme. I want to show n my homepage the posts of the current day. But if there are no post for that day it shows "No found". I want to show posts from the last day with posts ...
0
votes
1answer
59 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
317 views

Author List page: Exclude based on last post date

I have a Author page that I built using this code and it works fine. However, I have several writers that range from frequent to one-time writers. I would like to seperate out writers that have not ...
1
vote
1answer
332 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 ...
1
vote
1answer
685 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 = ...
1
vote
2answers
278 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> ...
0
votes
1answer
174 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
2answers
85 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 ...
2
votes
1answer
199 views

Custom Post Type Events Archive Grouped By Month

I'm currently trying to get my events listing code to print out headers by Month. So basically this: October event event September event event etc... Right now it just keeps echoing ...
0
votes
1answer
74 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
1answer
387 views

User-Specific Timezones? Hack? Plugin?

Is there any way, whether it be a hack, a plugin, etc., to give users their own timezone? I am using a purchased SMS plugin. Users (my clients) login and are able to send out text messages when they ...
5
votes
4answers
163 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
61 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
57 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 ...
1
vote
1answer
83 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
2k 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 ...
0
votes
1answer
146 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
391 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++; ...
2
votes
1answer
681 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' ); ...
0
votes
1answer
405 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. ...
0
votes
1answer
135 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 ...
4
votes
1answer
86 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
75 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
4
votes
2answers
11k views

How to get the post publish date outside the loop?

I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date. Here is my code: global $wpdb; $post_ids = ...
-1
votes
1answer
667 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
532 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 ...
4
votes
1answer
69 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 ...
0
votes
1answer
97 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
522 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 ...
7
votes
4answers
3k views

the_date() not working

I am using wordpress 3.2 and I did a query post like this: <?php query_posts("posts_per_page=1post=type&page=post_parent=10");?> Then I try to echo out the date of this post I queried ...