The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
9 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
0answers
31 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
31 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); $...
3
votes
1answer
56 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 ...
1
vote
1answer
28 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
40 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
32 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 ?...
0
votes
2answers
27 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
21 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
28 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
0answers
35 views

Cast woocommerce events date meta_value with wrong format in WP_Query

I'm using woocommerce events plugin to sale tickets in a client site. The client wants to display the next 3 events after today in the home page. I have created this code: $args = array( '...
0
votes
1answer
12 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
81 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
2answers
72 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 ...
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 ) &...
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
36 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
36 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
94 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
40 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
142 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
48 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
39 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
44 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
20 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
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. // *************************** // *****...
5
votes
3answers
191 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 ...
-1
votes
1answer
66 views

get_the_date() return always UTC+0 [duplicate]

I need to return correct ISO 8601 date format for my country (Poland, Warsaw). It should be UTC+1. I use function get_the_date() with argument "c". On General Settings in field Timezone I chosen "...
0
votes
1answer
48 views

Display year value before a set of posts

This is what I am trying to accomplish: I have a page template which displays "case studies" where "case studies" is a custom post type. the page template called: page-case-studies.php I actually ...
0
votes
0answers
87 views

Automatically move pending posts after 30 days and, update the post date, when users update the posts

I have a multi-user blog, and would like to implement two functions in WordPress 4.3.1. The first function moves publish posts in pending after 30 days. I used a add_action. My code: function ...
-2
votes
4answers
39 views

How to remove a date from wordpress post

djeddiedavid.info this is my website i want to remove a date that show on wordpress posts anyone help me ? date that show on the bottom of DJ upcoming event
0
votes
1answer
40 views

Get previous posts list

I'll give up. Have searched and searched and tried and tried... Can't find any solution to list previous posts. On a single post: I want to show a list of the 10 previous posts, the 10 before the ...
0
votes
1answer
69 views

Month display in English but required in Swedish?

I am using WordPress settings like below Image: On post output come like 13 October 11:49 but my requirement is to make it like oktober in Swedish and same for all other months. Thanks!
0
votes
2answers
36 views

How can I query on the year part of a complete date in a custom field?

My posts have a custom field named production_date and formatted YYYYMMDD. How can I form a meta_query to select only the YYYY part? $meta_query_args = array( array( 'key' => '...
0
votes
1answer
55 views

How to restrict an author scheduling their post date to a maximum X days ahead from the current date

How would I restrict an author in scheduling their post X (let's say 8) days ahead of the current date?
0
votes
1answer
39 views

suffix title with “EXPIRED” when scheduled post has reached it's published date

I'm scheduling and displaying all my posts in the future. I'd like to somehow add some text after the post title when the publish date is reached. In effect the post will expire at the time of the ...
0
votes
1answer
29 views

empty query breaks other queries

Hi I have a cpt query which displays 1 latest event based on date. It works fine - problem is when date is < today (theres no future events to display) this query is empty and also breaks other ...
0
votes
0answers
40 views

Use the_date with link

How I use the_date with link, a link to archive same date. <?php the_date('l j F Y', '', ''); ?> When there are multiple posts on a page published under the SAME DAY, the_date() only ...
0
votes
1answer
34 views

How can I set and update the the_date according to a custom field of the post

How can I set and update the the_date according to a custom field of the post? I have a custom field "date-time" with the following format yyyy-mm-dd hh:mm e.g. 2015-09-30 08:12 I'd like this date ...
0
votes
1answer
421 views

Ordering posts by custom field and grouped by month

I need display all custom posts (event), order them by custom field (date) and group by month: September Event 1 Event 2 August Event 3 July Event 4 Event 5 I know, it is frequently asked ...
0
votes
0answers
96 views

date archive future posts

Im using cpt for events and i need to display them in a calendar. most of the events are future. i managed to query the right ones by post_status at the archive, but I need to do the same at the ...
0
votes
0answers
124 views

How to get to the date of the uploaded file

Anyone can tell which is the filter (if there is any) used for the date of an uploaded file. This can be useful to limit the upload for the users based on the time.
0
votes
1answer
89 views

How to display a WordPress Custom Field only on a specific day of the week?

I've got WordPress site for which I've set up a custom post_type along with some custom fields created with CMB2 to display extra stuff within my custom posts. When editing a single item for my ...
0
votes
2answers
133 views

Query post for today, if no post get the previous one

EDIT : I answered myself. Simple request for you. I am trying to develop a code that search for post for TODAY. If it returns nothing, then get the latest post before today. For now, I have made a ...
0
votes
0answers
48 views

WP Group posts by year(desc) > month(desc) > date(asc)

I have a custom category template to group posts by a custom field 'event_date'. 2 things I cannot figure out, correctly: grouping by year and month, and having those in descending order, while the ...