The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
562 views

Display upcoming events in the next 30 days by querying posts with timestamp in custom meta

I have a custom post type "event" which stores a custom meta as a timestamp ($event_date). The date is always in a dd-mm-yyyy format, so I can generate a unix timestamp from this key. The timestamp ...
0
votes
1answer
404 views

How can I wrap html around the output of the_time function?

My current code in functions.php: echo '<div class="post_date">'.the_time('d', '<div class="month">', '</div>').the_time('F', '<div class="day">', ...
1
vote
0answers
406 views

How to remove/exclude specific posts in a category from RSS feeds after particular date [closed]

I want to remove/exclude some posts of a category from RSS feeds after particular date. First of all i want to specify that same requirement i already accomplish for front page posts. I have two ...
4
votes
1answer
1k views

Custom Post Type Archives by Date with Custom Permalink

I'm a bit stuck with getting the custom permalink for custom post type (CPT) archive to work. I've registered my 'press_release' CPT as following: add_action('init', 'press_release_post_type_init'); ...
5
votes
2answers
3k views

Default timezone hardcoded as UTC?

While debugging a plugin I was writing, I noticed that on line 36 of wp-settings.php, the default timezone is hardcoded to UTC with a call to the date_default_set_timezone() function. This means any ...
0
votes
1answer
3k views

Convert a date to ISO8601 date format

This is more of a PHP question than a WordPress one. I have a custom post type event that by default outputs the date as "September 11, 2011 9:00 am" format. I'm trying to format the post in ...
3
votes
2answers
2k views

What's the difference between get_the_time and get_the_date?

Both function returns date and time. What's the difference between them? Do you have any example? Thanks.
0
votes
1answer
149 views

How to change a meta value (of a published post) after X days.?

I have a custom field. I would like to change the text of that custom field after x days. I want something like this: if ( published post is more than 90 days old ) { echo "your post is more ...
2
votes
2answers
375 views

Display future posts?

Is there a way to display posts, scheduled for the future? I want to use the published data as an event date and time, which is obviously in the future. I still would like to use these posts for a ...
0
votes
3answers
563 views

change the year on all of my custom post types?

I need to change the published year on all of a custom post type from 2010, to 2011. What is the quickest way to do it? I have 200 entries, so manual would take hours!!
-1
votes
1answer
116 views

Standard API for rendering a date form

I'm hoping to enhance an existing plugin's setting page by adding an 'end date' form. I know how to add text and other form fields but was wondering if there is standard function that will render a ...
0
votes
1answer
82 views

Timed post and tweet?

I'm new to wordpress. Is it possible to say i would like to make this article public on this day and time AND have wordpress tweet it? Possibly tweeting the subject+link or a twitter msg i add in + ...
1
vote
1answer
227 views

Change the 'published on' text?

I am using the date and time in the post dialogue to log the date and time of future events, and would like to change the text to reflect that. Is there an action hook I can tap into to achieve that? ...
1
vote
1answer
471 views

Wordpress Locale Switching on Accept-Language Header

Is there anyway to get wordpress to automatically switch locales based on the HTTP Accept-Language header? Similar to how ASP.NET can do it with their globalization="auto" config setting. The reason ...
2
votes
1answer
978 views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
3
votes
1answer
2k views

Display last login time

I am using this script to get the last time a user logged in function get_last_login($user_id) { $last_login = get_user_meta($user_id, 'last_login', true); echo human_time_diff($last_login) . ...
1
vote
4answers
1k views

wrong php date()?

hey guys, it's weird and I've never experienced that before. I've created a new blog and a custom theme. I'm using <?php echo date("H:i"); ?>in my theme. The time that's put is 2h earlier. ...
2
votes
1answer
1k views

How to Delete Old Comments by Date?

I run a contest/giveaway blog at www.mommylivingthelifeofriley.com and currently have over 160,000 comments on 1100 posts. I would like to find a way to delete all comments from my site which are ...
3
votes
3answers
975 views

Set Custom Post Type title to the Post's Date

I have a custom post type, called 'status' and I have disabled 'title' in the post type. Right now it's setting all posts to have the title "Auto Draft". I want to set up a way to set the title to be ...
1
vote
1answer
960 views

SQL query to delete comments older than 90 days?

I'm working on a site that has 150,000 comments with an obvious hit in performance; is there an SQL query that can delete all comments older than say 90 days? They're not spam comments, and they are ...
2
votes
2answers
2k views

How would I bulk change posting date?

How would I bulk change posting date? I want to change about 20 post publish dates at a time in one click
3
votes
1answer
452 views

Custom Post Type Archives by Date (stored as meta value) WP3.1

I would like to implement date-based archive functionality (similar to original WP Archives widget functionality) for custom post type (CPT). What makes it difficult is the fact that I need to group ...
2
votes
1answer
1k views

custom field value date convert to unix timestamp problems

For some reason, I'm having difficulty converting a date value stored in a meta field to a unix timestamp (and back again). If I save the date as a string it all works fine, but if I convert it to a ...
2
votes
1answer
187 views

How do I create a dynamically-updated copyright statement?

I'd like to find an optimized, WP_Query-safe method for generating a dynamically-populated copyright statement for the bottom of my themes. That is to say, I'd like to check the date (by year) of my ...
0
votes
1answer
371 views

wp_dropdown_categories by date?

Is there any way to specify a time period for wp_dropdown_categories or wp_list_categories or something else...? I want to create a archive page, so that if your in the archive of 2010, you'll see ...
0
votes
1answer
208 views

Post navigation using date

On my site: www.finmand.dk/almastofa/nyheder (a danish site) I have used this code to navigate between the post: <?php foreach(get_the_category() as $category) { $thecat = $category->cat_ID; } ...
1
vote
2answers
7k views

How to get the date of a post in WordPress, so I could use it in a script?

I'm very new to WordPress. I need to get the date of a post and compare that date to a specific date (04/01/2011), so add some banners and stuff to every post created "after" that pivot date. But the ...
0
votes
1answer
608 views

Adding a class to last post in the_date

I'm using <?php the_date('l jS F Y','<h2>','</h2>'); ?> inside the loop in order to group/sort posts by date. This all works great but I would like to add a different class to the ...
1
vote
2answers
216 views

How do you format the date as a two digit year? (ex. “10.12.10” instead of “10.12.2010”)

I did a pretty thorough search and found a couple of closed (and unanswered) topics on the WP forums. Does anyone know if this is possible? The codex doesn't specify this as an option. Thanks!
1
vote
1answer
843 views

Displaying year, month and day archives differently

I'd like to display daily archives differently than monthly/yearly archives. How do I check to see if the archive template is being pulled for a daily archive vs. a monthly/yearly archive?
0
votes
1answer
2k views

How do I display posts by day?

<?php $my_query = new WP_Query("cat=1&day=''&posts_per_page=-1"); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> I'm trying to display all posts from ...
0
votes
1answer
539 views

Paginated Archives or Loop by Month

I'm trying to figure out a way to do a loop / archive page with posts organized by month. So where each page displays post from 1 month. Then the previous and next links would be labeled February 2011 ...
9
votes
3answers
9k views

Order by meta value or date?

Got a custom field called startDate but its only on a few events. I was wondering if it isn't set for a post I could use post_date to generate the posts list? // if meta_key _postmeta.startDate isn't ...
0
votes
2answers
2k views

converting custom field date format

I am using the More Fields plugin which gives me the ability to create a date formatted YYYY/mm/dd and I want to convert that to be shown like: February 11, 2011 Is this possible?
3
votes
2answers
7k views

Convert jQuery Datepicker Format to SQL Date Format

I set the jQuery Datepicker format to D d.m. displayed as Th 3.3. for a custom meta field that I want to use to sort posts. In SQL, the custom meta field is saved as D d.m. I would like to display ...
0
votes
2answers
369 views

Can anyone clarify difference between archive-{posttype}.php, type-{posttype} and date.php?

I'm trying to get the custom archives per post-type working, but after a week of trying, searching and scratching head I still cannot get it working. I'm mainly talking about the {post-type}/{year} or ...
0
votes
1answer
638 views

How to have search results page sorted by post date

On this search results page: http://p2reloaded.com/?s=versions&search-submit=Search I'd like to inverse the order of the results to start by newest post date first at the top of the page. Right ...
2
votes
2answers
700 views

Using date stored as custom field to filter posts displayed in admin

This seems like a fairly common problem, but I'm posting this as I've yet to find a solution to my problem here on WP Answers - any help is HUGELY appreciated! Ok - so I have a custom post type of ...
0
votes
3answers
4k views

Display posts starting from today date

How to display a list of posts from today date to future? I am actually using this code: <div id="news-loop"> <?php if (have_posts()) : ?> <?php ...
2
votes
1answer
2k views

Custom post admin filtering by post meta (the date)

I've created a custom post type for events that uses a custom field to retrieve the date for the event. It works ok and I'm able to filter the displayed results using meta_compare to compare the date ...
2
votes
1answer
3k views

Whats the way to format a date after using get_posts()

I see that theres no way to get a formatted date from a function like echo get_the_date($post->ID, 'd M Y'); get_the_date only works with the current $post. If I used get_posts() how can I ...
1
vote
3answers
593 views

How do I set up my blog home page to show only this weeke's posts automatically?

on my WPWeekly.net website, I am currently having to set the number of posts to show manually in the Setup->Reading. Is there a snippet that will let me have the home page blog show only the current ...
1
vote
2answers
95 views

Categorising posts/pages into years published

I have a lot of posts/pages, and I would like to create a list in my sidebar, showing all of the years that I have created posts/pages in, so for instance, if I have 5 posts/pages that were spaced out ...
14
votes
3answers
11k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
1
vote
1answer
1k views

timestamp and scheduled post irregularities

Update: I've confirmed the problem (that scheduled posts are based on UTC time), now just need advice and background to determine best solution. Questions: 1) how WP determines UTC time before ...
0
votes
1answer
361 views

How to call the_time current?

I'm using the_time function to print the current date on my site. The problem is, that it's returning post or page creation times on pages other than the front page. Can I force it to print the ...
0
votes
2answers
930 views

wp custom field date format compare

How do I possible to work with this code to work with date format Y-n-j Value start_date = 2011-1-20 end_date = 2011-1-30 Here are the original function came from this Query between two meta ...
3
votes
2answers
79 views

What is the best workaround for supporting all existing DATEs?

I want to make a weblog that has with every date 1 or more weblog posts, e.g.: Januari 24 Year 41 : Roman Emperor Caligula was murdered by Cassius Chaerea and the disgruntled Praetorian Guards. ...
2
votes
1answer
1k views

Plugin for changing a post's category based on it's post date?

Is there a plugin for Wordpress that will change a post's category based on how long that post has existed? I have seen other Wordpress plugins that use a library called "simple pie" to manage a ...
2
votes
2answers
3k views

Query between two meta values?

How do I limit the query by two custom meta fields, a start date and an end date? This is what my data looks like: meta_key | meta_value | ------------------------| start_date | 20100131 | //Jan ...