Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

-1
votes
1answer
18 views

How to randomize published date for WordPress custom post type

I have tried the following answer to randomize post published date: Update existing post dates to random dates It worked but I need to randomize custom post type. How do I do that? Example: post_type=...
0
votes
0answers
18 views

How can I display a desired date into a Wordpress page?

This question was posted on Stack OverFlow first. Discovering this Stack for WP Devs, I'm posting here too. Sorry if I should not duplicate. I'm trying to find a way to choose a date and display it ...
0
votes
0answers
16 views

how to add validation for min and max date range of contact form 7

I have created a date field using contact form 7 and set some min and max date range. It works fine with date picker widget but using keyboard it does not get the valid date. So I have created ...
1
vote
0answers
13 views

How to show recent and upcoming birthdays using meta_query

I have a date of birth user field, I am trying to show recent (past 7 days) and upcoming (next 7 days) birthdays. I have the below but it is not working because the years in the date of births are ...
0
votes
0answers
24 views

How to get the correct date depending on the current visitor timezone?

I want to change the date format for my custom post types from dates to time. So i starting using this code: echo get_post_time('g:i A', TRUE, get_the_ID(), TRUE ); It's working successfully but ...
-1
votes
0answers
11 views

Control User Login Expiry Date Starting From the First Login Date [closed]

I want to manually register user and make user access to expire within 30 days from the first date of login (not from date of registration). The code and plugin I saw only use registration date as ...
2
votes
1answer
21 views

Use meta_query to display events by date in custom field

I'm working on a template for a specific category archive of the custom post type event. I need to make a query that shows future and ongoing events, ordering by a date in custom field. $termName = ...
0
votes
0answers
16 views

Change Background Colors of Post Rows in WordPress Admin Based on Last Modified Date

I would like to ask the following - how to color, for example, in red all the rows in Wordpress admin panel for the posts that have not been modified for more than 3 months (or 1 year for example)?
0
votes
1answer
11 views

Grouping posts by date

I am trying to group my posts on the index page by date. For example: Date 1 Post 1 Post 2 Post 3 Date 2 Post 1Post 2 Post 3 For some reason, I keep getting the posts under each date. Here is my ...
0
votes
1answer
62 views

Add Date and Author to Posts

I need to add the date and author to blog posts. The line needs to read like this example: Posted on January 20, 2018 by Name Clicking on the date will take you to a page with all posts published on ...
1
vote
0answers
22 views

Make WordPress use timezone for email Date header

My WordPress installations send emails with the Date header specified in UTC: Date: Wed, 18 Jul 2018 15:18:50 +0000 I would prefer that the mail be sent with dates encoded in localtime, which is ...
2
votes
1answer
55 views

WP_Query meta_query results date by date

Don't leave! This isn't another question about how to orderby meta_value! I have a post type called events, and each post I create has a meta field I imaginatively called event_dates_wp which accepts ...
0
votes
1answer
39 views

How to Convert Date to Thai

The Thai text I want to end up with is: อาทิตย์ 03 มกราคม 2016 to อาทิตย์ ๐๓ มกราคม ๒๐๑๖ I don't think it should matter what language but in this case it is Thai. My function is: $strdate = ...
2
votes
2answers
107 views

Custom Post Types - How to include custom fields

I'm fairly new to wordpress and the content management system. I've been following a couple of tutorials to get started. I've been searching for specifically how to include a date picker in the add ...
0
votes
1answer
84 views

Wordpress returns a wrong date

I am trying to get the todays date , day and time . Today is : 10th july 2018,tuesday and time is 3.23am For time the below code works fine: $wpplcurrenttime = current_time( 'g:i a', $gmt = 0 ); ...
1
vote
0answers
23 views

WordPress Date with ACF

I am using Advanced Custom Fields using the Relationship field type and I am struggling to get the date of the post to come through. https://www.advancedcustomfields.com/resources/relationship/ ...
0
votes
0answers
13 views

Changing the date of new posts

I'd like all new posts that are created via the admin interface to have a date set in the future. For example, if I'm creating a post now, I'd like it to default to "scheduled for tomorrow". I found ...
1
vote
1answer
36 views

How to add 2 hours to the wordpress time formed with current_time(“mysql”, false)?

How to add 2 hours to the wordpress time which has already been formed using current_time("mysql", false)?
0
votes
2answers
43 views

How to remove a link of date archive

I want to remove the link from the date, this link leads to archiving. I'd be happy to get help - thank you very much
-2
votes
1answer
29 views

In my Website homepage I want to remove date which is written along author name [closed]

Kindly tell me how should I remove the date written alongside all posts in Homepage.
1
vote
1answer
228 views

Get posts by meta value with date

I have a post type called "agenda" and one of its meta value is the date of the event. How can I get the posts of the current year based on the meta value? I tried this args above but it doesn't ...
0
votes
1answer
18 views

Worpdress function for difference dates

can I show for each posts the insert date like as '1 hours ago', '2 days ago', '2 weeks ago', etc.. Thanks in advance!
0
votes
0answers
16 views

How can I create a Custom Post Type Archive page by year that continues to include all years since the first post

I understand how to successfully create a Custom Post Type Archive page based on each year using this code: Current Year: 'year' => $today["year"]-1 Previous Year: 'year' => $today["...
0
votes
1answer
36 views

How to hide post published date?

How to hide published date programmatically from all posts? I've tried adding filters, hiding some post metadata, but as I'm new to WordPress didn't figured it out yet. Can someone help me with this?...
1
vote
1answer
32 views

Use current date as tag?

I want to make a simple calendar in my wordpress. I want to show every day different posts, which have the current date as tag. For example, I put a tag 17-01-2017 in three posts. I want to get them ...
0
votes
0answers
75 views

WordPress change post date format from english to japanese

For my WordPress V-4.9.1 I want to change the Post date format from English to Japanese like DECEMBER 29, 2017 to 2017年12月29日. I know it is possible if I change the WordPress admin language but ...
0
votes
1answer
25 views

Assigning Two Different Post Dates For Single Post

I am using posts for listing my events. So i need to specify two different dates for my posts. I know there is only one post date, but i need to make it two to specify my events starting and ending ...
-4
votes
1answer
27 views

Why did my most recent article fall behind an older one on my site?

https://afrosapiophile.com/ This is is the face of my wordpress website. This article here: https://afrosapiophile.com/2017/12/25/side-eye/ Was written on the 25th of December. This article, the ...
0
votes
1answer
165 views

Convert Gravity Form Entry Date on Export

Gravity Forms offers a hook to modify field values when exporting an entry list using the gform_export_field_value hook. They show an example on how to change the User ID to the User Display Name on ...
0
votes
1answer
46 views

Unique Problem with the php date and get_posts

I have several date queries on an events page that outputs events posts according to the month and the year of the post. Each post has a custom date field in the form YYYY-mm-dd and a corresponding ...
0
votes
0answers
23 views

How to get the date of last updated post or page and put it in the footer

I want to show in the footer that my WordPress site has been updated recently, how can I show it on the the footer? There are codes that I find where they put the last update on the post, but I want ...
0
votes
1answer
79 views

Date Language doesn't change

i've switched to Italian Language for my wordpress website and it shows the translation correctly, but when i try retrieve date and time with this code echo "<span class='date' style='margin-left:-...
0
votes
2answers
60 views

How to hide meta from search result only on pages?

I have different content on static pages and post in my WP site. On pages is not desirable to view meta in search result, but in my post is important. Meta, I mean information about author, and date ...
0
votes
0answers
12 views

Add dates to various posts written on the same day [duplicate]

How I can put the date of various posts written in the same day. If I write various posts on the same day only show the date in the last post. The posts are in the in the front page into a loop. The ...
3
votes
1answer
368 views

How to display Last Updated date from the latest post for a category list

I've created a page on my site to simply list all the subcategories within a category using: <?php $args = array( 'show_option_all' => '', 'child_of' => ...
0
votes
1answer
37 views

How do I display posts ordered by a date custom field?

I'm trying to show post order by a date custom field that are displayed like this: Year Month Custom field post info(date, time, venue, and category) Title I found this ...
0
votes
2answers
194 views

Display published time for today's posts only

I'm building a blog theme. I know that the_date() and date() functions display published date of posts. And I know how to get posts' published time with the_time() function. I want today's posts to ...
0
votes
0answers
26 views

Force WP_Query to work in a local timezone [duplicate]

I have a template that displays an actual event if we have a today one, or a next future one. The template uses this WP_Query, that compares events date with the actual date: $args = array( '...
0
votes
1answer
65 views

Filter on the day of the week from timestamp

I'm trying to filter the display of posts by the day of the week (1=Mon, 2=Tues, etc) in the admin edit area. The custom field 'some-date' is a timestamp. The code below is not the right approach to ...
0
votes
1answer
73 views

Get Author Count By Day, Week and Month

I have a standard loop and I want to by the author's name show how many posts were published for the current day by an author.
1
vote
1answer
76 views

Replace ‘published on date’ with ‘modified on date’ on Posts

Okay, so I have googled this for the past few hours and even though I am getting closer, I am still stuck. Problem: If I posted an article on December 15th 2016 but I NOW I updated the same article ...
1
vote
1answer
356 views

Header: Include Date Published and Date Modified

I'm trying to put the Date Published and Date Modified into the meta tags of the head of the header.php page - so far no luck. This is what I currently have: <meta name="date" content="<?php ...
2
votes
2answers
442 views

Display date only once for a each set of posts relating to that date

The following loop works great for me in getting posts with a given date with the use of the_time(...): <?php $myPost = new WP_Query( array( 'posts_per_page' => '50', 'orderby' =>...
0
votes
1answer
47 views

Using system date format

I have WordPress theme and I use get_the_date function to display post data : <?php echo get_the_date( 'M-d-y' ); ?> But it seems it will be better to use get_option( 'date_format' ). How can ...
0
votes
1answer
50 views

Comparing Dates within plugin using PHP If statement

This is really simple, but I can't seem to make it work. I want the Due Date text to be red if the current date is past due. I want it to be green if it is still not due yet. Also, I set the due date ...
0
votes
1answer
890 views

Orderby ASC changes to DESC in WP_Query

I am trying to get posts in Ascending order using WP_Query, $args = array( 'date_query' => array( array( 'year' => $ppy, ...
1
vote
2answers
36 views

I don't arrive to do order_by title when i have a conditionnal year in a request

I have a problem with this request with get_posts,when I want to order by title with year, order by doesn't work but when I do it without year, the request works. $args = array( '...
0
votes
1answer
55 views

Sort / display recent posts by publish date

I recently renovated some sites and made many small (usually typos) corrections to several posts. That of course changed the last update date, so that now, if I display recent posts in a widget, they ...
1
vote
1answer
79 views

Update post meta value as date difference between two fields

I have this code which is displaying the difference in days between two custom fields <div class="distance"> <?php $date1 = get_field( 'date_start', false, false ); $date1 = new ...
0
votes
2answers
244 views

Human Time Diff, change mins to minutes

On my WordPress site, I am using the human time difference for the post date. If you have a post that was posted 59 minutes ago or under it appears as posted 1 min ago, 5 mins ago, or posted 35 mins ...