The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
18 views

Complex date range with WP_Query and BETWEEN

Backstory We have a bunch of events inside an events custom post type. They each have the following custom fields associated to them: start_date end_date On the front-end, we have a sidebar with ...
0
votes
1answer
11 views

Filter posts by current date ( WP Post Carousel )

So i managed to filter the posts with this snippet : <?php echo " works"; $current_day = date('j'); $current_month = date('M'); query_posts('day='.$current_day.'&month='.$current_month); ...
3
votes
1answer
21 views

How to remove published date <pubDate> from RSS feed

I've removed dates from my theme because all of my content is evergreen. The dates aren't visible to visitors or search engine crawlers on the site. But people can still see dates in my RSS feed with ...
0
votes
1answer
15 views

YearMonth datequery

I'm trying to make use of the Date Parameter 'm' which is for the YearMonth. I can't figure out what the query name is or how to use it to search for posts with it. Thanks
-1
votes
0answers
15 views

Trying to search for Month & Year in a Search Query

I am trying to search for multiple parameters in my search form (i.e. month and year) via the "Ultimate WP Query Search Filter" plugin but so far I can only get it to search for either a month or a ...
0
votes
4answers
41 views

Modify Date Format to German

I basically need to change the date format to german date format all over the WordPress site and I succeed it by changing the date time settings from the WordPress admin panel. Settings » General ...
0
votes
0answers
23 views

How to limit the post by date in WordPress FrontPage?

My website is http://removemalwareinfection.com. Currently, in WordPress, i am getting the recent post on the front page, But I want to limit the post. I don't want to show my recent post. It should ...
6
votes
2answers
22k views

How to get posts published between a date and today?

Is it a way to get posts published between a date and today with query_posts() ? Example : All posts published since 2012-04-01 Thanks EDIT : How to add the filter date on this Query Posts ? ...
0
votes
1answer
919 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
26 views

wordpress meta value compare between two date

I want to check date between two year of birth. But my saved value is date of birth. Meta key "birth_date". Now I want to check value between years using year. My saved date format like "01/01/1995" ...
7
votes
5answers
6k views

the_date() not working

I am using wordpress 3.2 and I did a query post like this: <?php query_posts("posts_per_page=1post=type&page=post_parent=10");?> Then I try to echo out the date of this post I queried ...
-1
votes
0answers
13 views

Product Query by meta_value and published date

I've seen some similar posts here, but this none that gives me really the answer. I have products that I want to order by their meta_key '_sku'. The SKU can be a number (ex. 1234) or alphanumeric (...
0
votes
1answer
1k views

WP Query Sort by meta value (date)

I have the following code where I want to sort by meta key "event_date" and only display posts after todays date and 3 weeks ahead. Somehow nothing happens, even when I'm stripping down the WP Query ...
0
votes
0answers
36 views

How can i change posts dates random?

I have totaly 5k content. I need change all of them dates. How can i set randomly dates? SQL? Example from 01.01.2010 to 20.06.2016 everyday can be dates.
1
vote
1answer
38 views

Count days from registration date to today

I'd like to add extra text to users who signed up for more the x days. My function is as follows: $today = current_time( 'mysql' ); $days_diff = date( 'd', $today); $...
1
vote
1answer
31 views

Converting Unix timestamp to wordpress date

I have trouble converting Unix timestamp (i.e. 1473897600) to Wordpress friendly date which displays at the date input field. I have a frontpage, post edit panel which is showing Unix timestamp. I ...
3
votes
1answer
60 views

Limit content by user registration date

I am looking for a code that will allow me to restrict access to content based on a User Registration Date. Therefore, if a user registers after content has already been posted then the user will not ...
3
votes
1answer
47 views

Displaying custom posts only if custom meta box's date is not expired

I have a problem with displaying custom posts - I want each post to show only if a date set in a custom field has not passed. I can't figure out the where I should put the if statement in the code. ...
0
votes
1answer
33 views

Date and time format for UK in a custom post type [closed]

I display the date format of my custom post type like: jS M Y which display: 24th May 2016 It's great, however, I would like to add the time, keeping this format. Is there any format type for this ?...
1
vote
1answer
773 views

$wpdb->get_results returns empty but value exists

this is my first question here. More then 5 years working with Wordpress, I always find the right way through the Google, but in this case I did not even know what to do, I really stacked :( So ... ...
1
vote
2answers
520 views

Query between dates using date picker filter breaks in Wordpress 4.2.1

Original post: Query between dates using Date Picker fields I originally made a post last year on this same subject, but seems the update to WP v4.2.1 has broken my filter. In summary, I am using ...
0
votes
2answers
30 views

convert time to WordPress user's local time

i saved SERVER time manually for specific options... i want them to convert to user-specific time for site (the time that is set in GENERAL OPTIONS). for example, i want 141234567890 to be converted ...
2
votes
0answers
23 views

Date/time limitation of posts where function must be executed

I have this piece of function in my functions.php file: function user_content_replace($content) { $sentences_per_paragraph = 3; // settings $pattern = '~(?<=[.?!…])\s+~'; // some punctuation and ...
2
votes
1answer
33 views

Styling the date format with date_i18n

I'm in wordpress, I am trying to format the date output. This code use to call the end of the sales promotion: <?php $thepostid = get_the_ID(); $sale_price_dates_to = ( $date = ...
0
votes
1answer
956 views

Sort Posts By Custom Field Date?

I have the following code displaying posts from a custom post type. However, I need them displayed in date order from information put in a custom field, can this be done? I try this code :- $course =...
5
votes
3answers
2k views

Post doesn't show date if there's another post with the same date

I have custom post type "press." and made a page template the queries posts of that type. The posts are supposed to show their published date, but if there are more than one posts with the same date, ...
3
votes
6answers
4k 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
14 views

Notify after 3,6,9 and then 12 months after plugin activation

I save plugin current month with below code on plugin activation. I want that after 3 , 6 , 9 and then 12 months a notification is generated for the user. How can we do that. Below is the code to ...
-1
votes
1answer
39 views

Output the published date / last modified date of specific page

I am trying to output the published date and last modified date of specific pages on a exclusive portal for certain users. Right now I can only find something similar for posts or within the specific ...
0
votes
0answers
9 views

Save Hist in Author Pages by Date (Year and Month)

I'm trying to save the hits that a page receives in the database so I can display them in the front-end if required. I need the hits that an author pages receives and save them by month. I'm a bit ...
0
votes
2answers
86 views

Add “Posted on” to post date

How can I add the words "Posted on" before the post data in a Twentyfourteen theme's post? The default is only to show the date and clock icon. I'm not sure if this is a basic modification or if it's ...
0
votes
1answer
24 views

Limit access to a page

I try to limit access to a page only for registered users before a specific date. For the others, a message must be display. Here is my code <?php if( strtotime( $user->user_registered ) &...
0
votes
2answers
84 views

Auto update post title and slug when post status is changed

I need help. Thanks in advance. I need a function that update post title and slug with some default title + current date when post status is updated from draft to published. I use this one to update ...
1
vote
1answer
81 views

Display page only if user registered before a specific date

I'd like to know if it's possible to display a page only for users that registered before a specific date. Example : I want to display a page (or its content) only for users registered before 1st ...
0
votes
1answer
39 views

Convert all dates stored in custom field

I have a custom field to store the date of games, and I store it in database like mm/dd/yyyy Now I need to convert all dates to dd/mm/yyyy So how can do that? Is timestamp a solution for it, if ...
-1
votes
1answer
44 views

ACF Field to set Publish Date - Post Duplication upon Update

So I am attempting to have a ACF set the date published of a Custom Post Type... and it sort of works. It will set the date of the post correctly the first time, but upon updates it will update the ...
-1
votes
1answer
28 views

How to get the date of all blog posts

I have added many blog posts in wordpress from the admin panel, but now i have to get date of the all inserted blog posts. i have used the get_the_date(), but this function return me of just first ...
1
vote
1answer
114 views

How to filter by date & a specific custom post type post-WP 4.4?

WordPress 4.4 introduced the ability to display date archives by appending /?post_type=custom_post_type to the end of the date url. i.e. localhost/2016/02/?post_type=news. I had assumed I could do: ...
0
votes
0answers
42 views

SQL to update custom post field

I tried to update a custom field but I can't to this... I have a custom post that that I used for a fill months. Now I create a new date custom field called "data-edital". On the new posts, I put the ...
1
vote
1answer
179 views

How to remove Date from Meta Description on SERP?

I noticed on a few recent projects the Date is displaying in the Meta Description for all Custom Post Types and Taxonomies in WordPress. I was always under the impression the Date would usually show ...
0
votes
1answer
56 views

Display Year and Month from custom field + Age Calculator

I have a custom field "DOB" on my custom post type which is in [Ymd] format. I want to compare that date of birth to current time and want to show "You are # years # months." I am able to calculate ...
0
votes
1answer
76 views

Display 'modified date' in Wordpress Twenty Fourteen

Could anyone tell me how I can show the modified date from posts to my readers? I use Wordpress Twenty Fourteen with the Twenty Fourteen Extended plugin. Structured Data testing Tool already shows ...
0
votes
1answer
46 views

Issue with strtotime() and Meta Box date

Shouldn't this code display the date provided from the META BOX date picker input field according to the language chosen? Explanation: The Meta Box value that is coming in though rwmb_meta() is ...
1
vote
0answers
45 views

Meta Query posts not showing on ending date of custom field

I feel like my logic is off, but the short version is I have 2 custom fields spitting out unformated times for event-start-date and event-end-date. I don't want to show a post if the start-date is not ...
0
votes
0answers
21 views

Search Post Types and the Meta Boxes

I have meta box called (orginalday), This i will save the post day when the user write post and save it in (pending), And i have form that have 2 input type to search post from day to day. So i need ...
0
votes
1answer
337 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
5
votes
3answers
199 views

Why my uploaded picture was loaded into /uploads/2015/02 not /uploads/2016/01?

Today is 2016-01-01 in my console. date Fri Jan 1 14:24:04 CST 2016 Now I write an article attached a photo which is taken today and publish it today. I found that the URL of the photo was ...
0
votes
1answer
258 views

Added Date Filter To Popular 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
1answer
49 views

Pre_get_posts comparison with custom field doesn't work

I got the following code in my functions.php. A couple of months ago it worked (or at least looks like it was), but now it isn't and I don't know what happened. // *************************** // *****...
0
votes
1answer
4k views

Display user registration date

I want to show user registration date like Member since: 15,dec 2012. I have a code <?php echo date("M Y", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?> but ...