The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
75 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
120 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
78 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
217 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
132 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
425 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
137 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
52 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
304 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
149 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
136 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
104 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
93 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
118 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
58 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
81 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
56 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
195 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
29 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
97 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
192 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
967 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
133 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
182 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 ...
1
vote
1answer
106 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
62 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
113 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
1k 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
54 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
426 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
54 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 ...
0
votes
1answer
88 views

Checking if field is set before comparing with meta_query in query_posts?

I have a query set up to compare the start and end dates for some custom fields. The start date is required for the post; however, the end date is not. This causes some issues with the following: ...
0
votes
1answer
88 views

Generate daily archive whenever any post type is added

We have an issue with our date archive in WordPress, where our daily archive (example address www.xxx.com/2013/01/09) is only generated when a post from the default post type is added. Any day where a ...
0
votes
2answers
55 views

Plotting posts on a graph

Here is what i want to do: For a specific date i want the number of posts from a certain tag. For example: on 14th March i have a certain number of posts tagged "jazz". I want to plot that number on ...
0
votes
2answers
8k 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
2answers
360 views

Query posts from current year

I don't quite get why this isn't working. I'm trying to use the following to only show posts from the current year on the front page: <?php query_posts( "&year=$current_year&order=DESC"); ...
1
vote
2answers
2k views

WP_Query most viewed posts, in multiple Post Types, last 30 days, excluding a specific taxonomy term

OK so I'm about 90% done, the only part that keeps breaking is when I try to exclude a specific taxonomy term. Break down: Sorting: ('v_sort' => 'views') This is being done via the popular ...
1
vote
1answer
1k views

How to sort CPT by custom meta value (date), and return posts month by month

For future reference: I am using the great Meta Box Plugin to help expedite meta box creation for my custom post types. My goal: To build a highly customizable events section closely resembling a ...
0
votes
1answer
2k views

Order post by date with ACF

I implemented a custom post type for a class post. Now every post has a additional date picker called "date_event", my question is: Any have ideas how can i order the post for the last date of the ...
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
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
1k 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
193 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
103 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
105 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
301 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
147 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 ...