The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
91 views

Do multiple jobs on date change without WordPress cron job

I m trying to randomize several posts on my client's site which are on different pages , everyday. So I wrote a function which returns true on date change, and if does, I randomize the post ids and ...
0
votes
1answer
47 views

Getting an extra post's meta data?

I seem to be getting an extra post's data when calling get_the_time('Y'); I only have 2 posts, but I seem to be getting 3 dates? I have no idea why. Here's the code: <?php $args = array( ...
2
votes
1answer
79 views

How to stop a user from updating the post date

I have a custom role, called "dealer". Once they have posted a new post, they cannot delete it. It's important they cannot update the date either, and I'm a little stuck on how to do this. It looks ...
0
votes
0answers
18 views

Query posts than have a lapse of time active

First of all, sorry guys for my poor english. OK, i wanna make a query for show posts that doesn´t passed 3 days from it publication. I set a field for the expire date when it´s published (the time is ...
0
votes
1answer
185 views

Display custom post types by date field

I have a custom post type that is simply titles with a date field. I want to display these posts in a list in order of this date field (not date posted). So simply: -- Sample date Event title 1 ...
0
votes
1answer
193 views

Posted date format not reflected

WP3.6, Twenty Thirteen theme No matter which Date Format I choose, the date on actual posts are shown like this: %A %B %e%q, %Y Note that the actual texts look like this; not even the date values ...
0
votes
0answers
93 views

Get last 5 days with posts

I am trying to get a solution to this question of mine http://stackoverflow.com/questions/18487639/date-base-archive-on-wordpress-homepage I am trying with multiple loops, if thats possible. But I ...
2
votes
2answers
183 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
103 views

Issue with sorting by post date and custom post type

I'm having a strange issue with sorting by post date. I created a slideshow post type and it does by default order by post date but If I change the date posted through the admin the order doesn't ...
0
votes
1answer
43 views

Wordpress archives by custom field and date

I have a strange situation on my hand. I want to list my archives based on a custom field (numerical value) but also display something like a cover. We have specific posts in different categories ...
0
votes
2answers
81 views

Why does my URL keep returning 404 error code?

I have a custom type on my wordpress site called 'movie'. If the user type this URL : http://mysite.com/1994, I would like to display all movies published in 1994. Unfortunately, I get a consistent ...
0
votes
2answers
135 views

If Posted After Date

I need to get a different "get_template_part" based on the date and category. I have changed the outlay of the category which means any post in that category before today's date wont be able to use ...
0
votes
1answer
22 views

Change post date for testing purposes

Is there a way I can change a post date to preferably a different month and a year for testing purposes?
0
votes
1answer
322 views

Getting images from media library and get_the_date() not working

I've got a function to display all images in the media library on a page. I would like to display the date of each image, but using get_the_date() only returns today's date. Here is the code I'm ...
0
votes
1answer
573 views

how do I get the date in a date archive page

In archive.php, if it is a date archive, can I get the date using a function? Consider a url like this: myfirstsite/2013/08 - I want to get the 2013/08
0
votes
1answer
33 views

Is each issue of a magazine site a static page

I want to create a monthly magazine style website. I can see the url for a month is something like this: www.magazine.com/mywebpage/2013/08 Suppose I want to create a custom page for each month, ...
0
votes
1answer
89 views

url for posts for a date within a category

I am trying to create something like a newsletter. I'd like to show a set of categories with hyperlinks. however, I want to restrict that to the specific date. Clicking on the hyperlink will show ...
0
votes
0answers
137 views

Date filter for post query not filtering results when variable outside the function

I am working on the following code which should display the most popular posts that are X days old ($days = 7;) (1) The main problem here is with my filter_where function. I want to pass the number ...
0
votes
2answers
86 views

check if a draft has been moved there from publish to draft

I am writing a plugin, part of the functionality does functions on hook: publish_to_draft I then later want to re-publish that post and trigger specific functionality to see if it has previously been ...
1
vote
1answer
247 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
1answer
153 views

Wordpress show bad the php hour and date

For my surprise today i see wordpress put bad the hour In settings i have the hour of my country , France and City Paris And today i try for create one function the php date function for show the ...
1
vote
1answer
531 views

SQL query to update post_date (one post = one single date & time)

I have 120 posts of one category ready for my wordpress blog. For the moment, posts are drafts and I don't want to schedule them manually. I want to publish them like this: 4 articles each day from ...
0
votes
2answers
164 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 ...
0
votes
1answer
55 views

Change News Story Layout Based on Date Range

My website has been up for 10 years and as such has gone through various layout changes. Whenever I have made a new layout, I have added all news stories that were made under that layout into a new ...
1
vote
2answers
399 views

Preventing 404 error on empty date archive

On a date archive page when no posts exist (for that date) WordPress throws across to the 404 page. Is there a way to make WordPress continue to use the original archive instead of the 404. That way ...
0
votes
2answers
175 views

Display yesterday's last post's Custom field from Unique terms of one Taxonomies

I have problem in my first theme design, and I think you can help me easily!(I searched my problem several times in Google and WordPress codex but I cant find exactly that I want!!) I want to ...
0
votes
1answer
151 views

Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months

I have a post type that holds a custom meta field with a date in it. The date is stored in the format: yyyymmdd. On the archive page for this post type I want to create 12 separate containers, one ...
1
vote
1answer
114 views

Add new post with predefined / preset date

The current situation The plugin I'm currently working on is an additional post list view: A calendar, as you can see in the following screenshot. Admin calendar view with MP6 and handheld screen ...
0
votes
2answers
98 views

Sorting past events by month

I have a site that lists upcoming events and past events. In my category-past-event.php template, this is how I've gotten past events appear in descending order (from most recent to oldest): ...
0
votes
1answer
132 views

Added Date Filter To Pupular Posts Query

I have the following query, which was put together with snippets in the functions.php file. <?php $popularpost = new WP_Query( array( 'posts_per_page' => 5, 'meta_key' => ...
0
votes
0answers
62 views

How to save an integer as taxonomy term?

I've written a custom meta box such that taxonomy terms will always be integers (Unix timestamps), and I'd like to keep them as integers so I can sort these posts by their Unix Timestamp in the ...
0
votes
1answer
100 views

How to display an icon when a new post is published and then remove it when a specific time past?

Every time i publish a new post i want to display an icon like a badge (NEW) and after a specific time it will disappear. Lets say i publish a new post and i want to display that it is a new post. So ...
0
votes
2answers
60 views

Update post date of page when Visitor access that page?

How to update post date of page to real time when Visitor access that page? Example: I write a post on May 28, 2013. And now, when I visit that post, it will change may 28 to June 8. How to do this? ...
0
votes
1answer
206 views

Show all 12 months regardless they have posts

I need to show all months for a year for an archives page. All 12 months must be shown regardless of whether or not there are posts published for a month. Like this: Year: Jan Feb Mar Apr May Jun Jul ...
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. ...
2
votes
2answers
110 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
209 views

Changing the post date without causing 404 error

We have permalink structure based on date (like 'www.mysite/2012/05/27/postname'). Some times there are some posts that we need to be shown the first, so we change they date. The problem is, that by ...
7
votes
1answer
1k views

How to integrate get_post_time with date_i18n function?

I have date format and would like to translate to another language with date_i18n function how can I integrate with get_post_time here is my code : $time = get_post_time('F j, Y', ...
0
votes
0answers
136 views

Complex WP_Query Using Post Date And Post Meta

I am using Wordpress as a CMS on a website which has standard posts, a custom advert post type and a custom event post type. The event post type has some custom meta which stores the event start date. ...
0
votes
1answer
26 views

Switch Categories on a Specific Date?

I usually like to provide a code I've started with and have others help me out with it - but this is one where I don't even know where to begin. I would like to be able to set a date on posts in ...
0
votes
2answers
200 views

How to output comments number of a post per day?

I have a question about the comment numbers in a post... For now, I can output the total number of a comment inside a post outside the loop. That's cool enough, but I want to get show the comment ...
3
votes
3answers
1k views

Display posts of the last 7 days

I'm trying to display the 5 best rated posts of the last week (7 days) on my website, however I can't seem to figure out how to display them. Here's what I've achieved so far but it doesn't seem to ...
1
vote
1answer
109 views

Post preview gives 404 when permalinks are purely date based

I have an issue pertaining specifically to the situation in which permalinks are set to be based only on publication date. My permalink structure is as follows: /%year%%monthnum%%day%/ When I try to ...
1
vote
2answers
69 views

Display post date as 04/26/2013

I want to modify the date display of the post entries from current format: April 26, 2013 to this: 04/26/2013 Where in the code can I make this change? Thank you in advance!
1
vote
1answer
151 views

Changing the post date and time with function

What function can be used to update a post's post date and time to the current date & time?
0
votes
1answer
2k views

month name translation

I use the birdtips theme and it formats the post date as $birdtips_posted = date(__('Y. F j.', 'birdtips'), strtotime(get_the_time("Y-m-d"))); where Y. F j. is already rewritten to reflect my ...
0
votes
1answer
55 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
1answer
470 views

Wrong date returned by get_the_time

I have this line of code : $registration_date = get_the_time('F j, Y').' at '.get_the_time('g:i a'); I just ran this on my BlueHost hosted website and it returned : January 29, 2013 at 12:54 pm ...
0
votes
0answers
59 views

Displaying posts by year

I'm trying to display posts on the homepage from the current year only. I am using the following: <?php if ( is_front_page()) { ?> <?php $current_year = date('Y'); ?> <?php ...