The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
15 views

Retrieve current and localized month

instead of writing array of months in desired language, and doing a function to replace date('m') with localized month... I believe there should be some fast and easy way to echo current month, after ...
0
votes
1answer
52 views

Display post from specific date

How do I display posts by a specific date? If it is 15 July today, it'll display posts from about two or three days ago, like the 12th of July's posts. And tomorrow it'll display the 13th of July's ...
0
votes
1answer
16 views

Thumbnail gallery by date and taxonomy

I'm having problem to create something like image gallery. What I wanna do is, in the home page sidebar, there will be a box named photo gallery which will contain 2 or 4 images thumbnail (just like ...
0
votes
0answers
15 views

Countdown to post date tag function?

I made an events post type and I wanna make countdown to post date, for example: Let's say the post is due 5 days later so it writes in the post '5 days remaining' Any suggestions?
0
votes
0answers
16 views

wp_next_scheduled() with jQuery Countdown

I'm working with the jQuery Countdown timer for the first time and I wanted to integrate it into my Wordpress site to display the time until the next scheduled cron event. When the countdown has ...
1
vote
1answer
29 views

Use the same date-based permalink structure for all post types

Is there a way to use exactly the same date-based permalink structure for all (non-hierachical) post types on a site, including posts and custom post types? I'd like all post types to have the format ...
0
votes
2answers
40 views

How to show monthly archive posts?

my custom archives page is : <?php get_header(); print ('<div class="row">'); $archi = wp_get_archives('echo=0'); $archi = explode( '</li>' , $archi ); $archi_count = ...
0
votes
2answers
43 views

Change the date and time in wordpress

Is there a way to change the date and time in WordPress, not the timezone, but the date and time all together, like make it 03-21-85 11:11 PM. I want all dates and times to be changed, not just to one ...
0
votes
0answers
42 views

Date Archive template per category

I have the following template structure currently: category-news.php category-magazine.php category-filmography.php Each page has a different sidebar, and each page has an archive widget in that ...
0
votes
2answers
127 views

Query between dates using Date Picker fields

I'm looking to replace an events plugin that i have on my website currently. We realize we don't need a full blown calendar and things like that, we just need to be able to enter in Events with a ...
1
vote
3answers
54 views

Taxonomy and Date in same query?

Is is possible to combine a tax_query with a date_query in the most recent Wordpress? Here's my attempt to do so: $args = array( 'post_type' => 'job', 'tax_query' => array( array( ...
0
votes
0answers
31 views

Use custom field “date” compared to today's date to display & order post list

I am at a loss here. I have a custom meta field blser_date where the client can use the date picker. The meta field is setup in a meta box array (this may be an issue b/c of the key?) Here is the full ...
0
votes
1answer
27 views

WP_Query Date Filtering Inclusive Being Ignored

I'm currently working on a plugin that contains a shortcode which allows users to filter a custom post type by date. They could choose "Date From", "Date To", and "Date From with Date To". When ...
0
votes
1answer
111 views

Retrieve taxonomy terms in order of their post's date?

I'm building out a custom taxonomy archive page that needs to list terms in order by their associated post's post_date. I wrote this, it's working, but I hate resorting to custom SQL: global $wpdb; ...
0
votes
1answer
57 views

Display Current Post's Position in Custom Taxonomy

I'm using custom post types and taxonomies to organize posts into different series where the order of the posts is important (travel narratives). My plan for the single-{custom-post-type}.php was to ...
1
vote
0answers
66 views

ACF Plugin - Dropdown menu of Posts based on Date Picker range [closed]

I am building a website with a Custom Post Type, "Events". I would like to use the Advanced Custom Fields (ACF) Plugin to provide custom fields for this post type, 2 of which will be ACF Date Picker ...
1
vote
1answer
24 views

Get list of years when posts have been published

I want to create a list of posts from a Custom Post Type and add some filters the user can click to filter the list. I added filters for all the categories by using the get_terms() function. Now I ...
0
votes
0answers
19 views

Post Query Glitch Causing First Post to be Out of Order

My problem is that there is a stubborn post at the top of the set of returned posts that somehow isn't sorted with the rest of them. Despite upgrading to 3.9, this issue still persists. For ...
0
votes
3answers
41 views

Show different time stamp based on time

What's the best way to show a time stamp based on different times? For example: if a post is under 24 hours, show %% mins/hours ago. If a post is over 24 hours, show month/day/time. If a post if over ...
0
votes
1answer
89 views

Ordering custom posts by meta field date

I've tried every combination of examples here on the boards and nothing seems to get me what I need. I have an events post type with multiple fields in a custom meta box, one of which is a date field ...
1
vote
1answer
75 views

What's wrong with my date_query?

It's WordPress 3.9 "Smith". I'm trying to implement a new Archive page as per the suggestion of @Milo. $categories = get_categories( $cat_args ); //it's NOT important for the Q, as it's fetching ...
0
votes
0answers
60 views

Display “Today” Instead of Date for Pubslished Posts

I have a list of 'post_status'' => 'future' which are published at certain dates throughout the year. These posts are custom posts whith Advanced Custom Fields. Since a couple of days I'm trying ...
0
votes
2answers
30 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
28 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
64 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
207 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
99 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
53 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
181 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
79 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
38 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
172 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
62 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
106 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
22 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
44 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
71 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
21 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. ...
1
vote
1answer
67 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
27 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
77 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
133 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 ...
0
votes
1answer
376 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 ...
1
vote
1answer
142 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
64 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
35 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
24 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
60 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
24 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
99 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 ...