The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
64 views

How do I publish portfolio items with a future date?

I am trying to publish portfolio items with a future date (using for an event based website) and I can't see to find any plugins or anything. I have seen them for generic posts, such as "The Future ...
0
votes
0answers
30 views

Same date post in one box

I would like to ask for a little help. I wish you the same date is a Post;, you just enter the time of the WP. The twist, however, is that it is all in a box. I'll show it to be understood: ...
0
votes
1answer
121 views

How would I use this filter to change the output of the date format to “Twitter time”?

I'm using a plugin called Latest Tweet Widget to display the latest tweet. The tweet date gets displayed by the month and day (Mar 22). However, I want it to be in "Twitter time" meaning words like "3 ...
0
votes
1answer
343 views

Using WP meta query to show custom post types by a start and finish date

I have a custom post type called 'events', I have a page which displays events by each month. Each event has a start_date and finish_date custom field (using advanced custom fields plugin) which ...
0
votes
2answers
109 views

Using php inside javascript [closed]

I have got the following code in a javascript(jquery) file called custom.js: var gapinvite = new Date(); gapinvite = new Date(2014, 06 - 1, 2); $('.days').countdown({ until: ...
0
votes
1answer
103 views

Get post closest to today

as the title indicates I am trying to make a query for the post closest to today's date. I know this is a duplicate post but the ones I have found on the topic has not been able to solve my problem. ...
1
vote
1answer
504 views

wpdb update add current timestamp not working

So using the $wpdb->update to add some data to a custom table, trying to add the current timestamp but it's not saving the right stuff(0000-00-00 00:00:00 this is saved). overview code ...
0
votes
1answer
135 views

Date is wrong on 'all posts' page

The website i'm working on has a homepage with posts and at the end of the page a button with view more posts. When I click that button it sends me to 'all posts'. On this page I have a problem, the ...
0
votes
0answers
58 views

Order a query by meta_value and then by post_date

I'm using the following query (mytheme/function.php) to sort posts by Custom Field(=admin_rate) function sort_searchresult_by_admin_rate($k) { if (!is_home()) { $k->query_vars['meta_key'] = ...
1
vote
1answer
349 views

Advanced custom fields: Customise date picker's start date (need to choose year 1500 onwards) [closed]

In Advanced custom fields, I would like to customise the date picker so that, ideally, I can only select a year in the 1500s/1600s but at the very least allow the datepicker to go back to the 1500s. ...
0
votes
1answer
103 views

How can I prevent the post_modified column in wp_posts from being updated?

On my site, I display each post's Last Updated date instead of its Published date in order to let visitors know how recent the post is. I'm currently developing a new theme, and some of the features ...
2
votes
1answer
119 views

How can I display a specific user's first published post?

I'm looking for a way to display a user's first published post using their unique ID. I have a function that calls a list of specific users using their IDs, and would like to display the date the ...
0
votes
2answers
24 views

Is there anything special I have to think of when setting post_date_gmt when inserting a new post?

I'm inserting information from a user into a custom post type. $current_user it a user-object. Is there anything special I have to think of when setting post_date_gmt when inserting a new post with ...
0
votes
0answers
59 views

Query custom post type by date field only working when two posts match the query

Hi I am trying to query a custom post by an advanced custom field that is a date field and this is how it is registered in a plugin that I have created to take care of all non-visual aspects of the ...
0
votes
2answers
89 views

How to update the 'modified_time' of a post ONLY when content is changed?

For some reasons I show the Last Modified information to my users in the blog. Recently I have to clear up my categories and tags, but these actions will result in the update of 'Last Modified' field ...
0
votes
0answers
23 views

Get posts from similar time as current post

Hi guys I've been struggling with this for a while and wondered how you lovely people would go about implementing it. I would like to show 4 posts that were posted before and after the current post. ...
0
votes
1answer
95 views

How to get date using timezone saved in options? [duplicate]

This code does not work correctly and returns time using timezone from computer and ignoring timezone stored in WordPress options: date_default_timezone_set( get_option( 'timezone_string' ) ); $hours ...
0
votes
0answers
30 views

How to set a category by day name?

I have a category for each day. Sunday, Monday, Tuesday, etc. I want to show this category fixed depending on the day of the week. I'll also have other categories to filtering. So, the category day ...
0
votes
2answers
138 views

Show previous month's posts

I've managed to loop through the current month's posts in January but I am trying to get the previous month's posts in December of the previous year. I think this is where the problem might be, that ...
0
votes
2answers
266 views

How can I show many posts an author has per week?

I've searched around and have had no luck or success in finding a way to show how many posts an author has made in a certain period of time (e.g. - a week) Any ideas on how one would approach this? I ...
1
vote
1answer
763 views

Query current and future events, ordered by begin date

Using the Custom Post Type UI extension, I've created a 'Event' custom post-type, which fields are populated using custom fields (created with the extension Advanced Custom Fields) such as ...
2
votes
1answer
248 views

Wordpress Custom Query to show posts from last x years

I have found a way to show all posts from the current year with this code: <?php $today = getdate(); $lastyear = $today[ 'year' ]; $args = array( //'nopaging' => true, 'paged' => ...
0
votes
1answer
86 views

How to organise post by category and date

I'll try to be as clear as possible. I'm working on a project that requires posts organised by category and date. I need something like this: First step: Annual listing of archive 2014: Jan Feb Mar ...
1
vote
1answer
52 views

Shortcode for latest -not expired- posts

I've made a short code (part of a plugin) to display the posts which aren't expired. For saving the expiration date, i made already a meta key called newsbox-date. Handy for micro-news, short ...
0
votes
0answers
30 views

Save time when posts has been favorited

I want to add the time when a user marked a post as favorite and want to display it. function wpfp_add_favorite($post_id = "") { if ( empty($post_id) ) $post_id = $_REQUEST['postid']; if ...
0
votes
1answer
78 views

date.php shows all posts. how to fix it?

I am using the following function for category.php. It's working fine. function cat_page_list(){ /* post : returns the post for category page */ $paged = (get_query_var('paged')) ? ...
0
votes
0answers
25 views

Load Index on “Earlier” Post, Prev and Next Links

how would i load the index of my blog at a later point in the reverse chronological feed while maintaining the chronology of the feed overall? i found this explanation of how to load the feed at a ...
0
votes
1answer
137 views

Divide WP_Query posts by date & post type

I have a WP_Query that divides 2 Posts types by date but the functionality is not there. Currently it outputs the dates and posts on the same level like.. -Date -Post -Post -Date -Post -Post What I ...
0
votes
1answer
405 views

How to remove “Image Information” and “post date/author” from a media page?

I'm trying to use Wordpress to setup a simple website for my business, and I'm having issues with the gallery page. Once an image is clicked and brought to it's specific page, it includes author and ...
0
votes
1answer
130 views

How to display date of blog creation

Is it possible to display (in PHP) the year when the blog was created? I want use this in footer (copyright) on my several blogs with my theme.
0
votes
1answer
46 views

date.php shows only three posts' title. how to fix it?

my archive.php <?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'show_post_count' => 1 ) ); ?><br/> my date.php <?php get_header(); while ...
0
votes
1answer
49 views

How to hide the year in archive link

I am using the following code to show the archive link by month. <?php wp_get_archives('type=monthly&limit='.date('m').'&show_post_count=1'); ?> but it shows as december 2013 (3) ...
0
votes
1answer
154 views

How to get the date dynamically from archive.php to date.php?

My archive.php <?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12, 'show_post_count' => 1 ) ); ?><br/> My date.php $date1 = get_query_var('date'); ...
0
votes
2answers
151 views

How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp

This is somewhat of a continued problem from another question that I had asked. Here is the original post. pre_get_post filter returns results when there should not be Since then I added an orderby ...
1
vote
1answer
236 views

Query posts with numeric meta values within a given range

I'm building a rental agency's website with WordPress. I'm having difficulties finding a good way to store an apartment's availability in meta fields. Specifically, enabling visitors to find ...
0
votes
2answers
78 views

Post publish date [duplicate]

if I have more than one posts that publish in the same day, the_date() function does not print publish date. How can I fix it? thanks I solve this by: "the_time(get_option('date_format'));"
0
votes
1answer
67 views

Display metabox with date

I'm trying to add metabox with date in WordPress. I used code from this page It works well, but I have a problem displaying the metabox values on page. My loop: <?php ...
6
votes
2answers
155 views

Is it possible to Schedule Attachments in Wordpress?

As it's fairly well known, it is possible to schedule Posts in Wordpress for publishing. Also Attachments are actually Posts (in the more internal, technical meaning). So the question that bothers ...
1
vote
0answers
54 views

make a pagination that show posts by date

i dont know if this is right question or not . but what i want to do is that , i need to create a pagination that show posts by date . i know the regular pagination is like this first-page - 22 - 23 ...
0
votes
2answers
114 views

Query date in wordpress loop

I currently have a custom post type called 'events'. I created this from a tutorial here http://tatiyants.com/how-to-use-wordpress-custom-post-types-to-add-events-to-your-site/. I want to query the ...
0
votes
2answers
390 views

Default sort on admin columns with meta date hides draft posts with empty date value

I have a custom post type of 'gigs' and a metabox (using meta-box plugin ) with event start date and time saved like: 2013-11-29 20:30. If I save a draft with no time/date set then it shows up in ...
0
votes
2answers
52 views

How to display lastest post date in the homepage?

I'm looking forward to display, somewhere in the homepage of a WP site, a legend saying: Last updated: XX/XX by grabbing the date from the most recent post, but not showing any of its content, ...
0
votes
1answer
48 views

Set Custom Date for Posts

I have a blog im working on in draft form. These blog posts are relevant to various days in the past few weeks but I would like to keep them hidden for the moment. When I publish one it gets todays ...
0
votes
1answer
114 views

Meta Query for specific months

I have a custom field which stores a date in a timestamp. I want to run a query that display posts based on the month, for example all entries from March, the specific day or year doesn't matter. I'm ...
0
votes
1answer
666 views

date_query seems to be ignored by wp_query

I'm altering my main wp_query in a pre_get_posts filter in order to improve my site search capabilities. I've successfully achieved searching in taxonomies, but I fail when it comes to the post date ...
1
vote
1answer
437 views

Get random posts between specific dates / of specific age

I need to get post IDs from a custom post type randomly and the posts are posted within 30 days. But I can't really find a solution. How can I do it? This is my query. ...
0
votes
1answer
34 views

How to rearrange a pool of posts joined using two queries?

I need to select posts for two different months (current, past). As far as i know, it is not possible to pass m date parameter as an array of integer instead of an integer, so I am performing two ...
12
votes
2answers
381 views

Unable to select an old date in wordpress

I am unable to set the year below 1899 for a post. If i set year below 1899 it is set to the current year automatically. I have purchased the Timeline theme and asked in their support forum. They ...
0
votes
4answers
488 views

Query Posts by date range with fixed beginning and end

I need to get posts from a certain timeframe. I am using the posts_where filter. I want to specify a beginning date and an end date. This is the function I use: function filter_where( $where = '' ) ...
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 ...