Questions tagged [date]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

WP_Query() displaying past post / event

I'm making a page for past events (using Event Expresso plugin) and I'm kinda confused about the wp_query. This one works: $atts = array( 'title' => NULL, 'limit' => 100, '...
0
votes
0answers
17 views

Redirect page during a weekly time interval

I have a registration page 'register' which sends information to a third party server as part of a dual registration process. The 3rd party have a 2 hr weekly maintenance schedule every Friday 9-11pm ...
0
votes
1answer
15 views

How to display posts categori list by day wordpres

Please help me I want to make a list based on the name of the day ordered based on the selected category I have code like this but it doesn't work orderby day <?php $args = array( '...
1
vote
0answers
38 views

WP_Query: Group events by year, sorted DESC; then by date for each year group, sorted ASC

I'm trying to set up a query for an "event" custom post type that groups posts by year, with a heading for each year, in descending order; then, for each year group, ordered by date in ascending order ...
1
vote
1answer
35 views

What are the “U” and “G” time formats?

In WordPress time functions, such as get_post_time(), one can pass a couple of formats that I do not understand what they do. Those are U and G. What are those exactly? Documentation is pretty vague. ...
0
votes
1answer
41 views

Remove the month and year from a WordPress Date?

So, I am wondering if there is a way that I can make this: February 28th, 2020 Just output NO month and NO year so just 28th (i.e. just the date) What approach would you take? I am applying this ...
0
votes
0answers
26 views

Display Category Name and Date Posted on Blog Post

I am using Astra Theme wordpress >5.0 version I want To Display Category name at top left corner of my Blog post Like Category:Technology.Also Date Published above header like Date Published:3rd ...
0
votes
2answers
28 views

get_the_date() returns english Year & Day when language is Arabic

I changed my WordPress language to Arabic, Now get_the_date() returns يناير 30, 2020 (half Arabic & half english) but I need to get date full Arabic like: يناير ٣٠, ٢٠٢٠ How can I do this?
0
votes
1answer
39 views

WordPress suddenly starts uploading media to an old (backdated) folder

I've seen a couple of people ask about this but without a general conclusion. It worked until recently, but recently all media uploads from the media upload tool end up in an old folder, 2019/10, ...
0
votes
1answer
15 views

Comparing Meta Field date in WPQuery using Meta_Query?

I have dates stored in the format d-m-Y, and i want to display any posts that are in the past, before today. $args = array ( 'post_type'=>'property', 'post_status'=>'publish'...
0
votes
1answer
21 views

Sort custom post type by most current date picker

I'm trying to sort custom post type made with ACF plugin by most current date. Ideally future most current post should be first. Currently, I'm sorting by date, which gives me the earliest post as the ...
0
votes
1answer
36 views

How display modified date of most recent modified post in wordpress?

I need display last modified date of most recent modified post in out of loop.
0
votes
0answers
11 views

Serve visitor post time adjusted to their timezone

I want post times to reflect the timezone of the logged in or logged out user on my site. So if I post at 2:43PM London time, I want a user or visitor from Tokyo to see the post time as 11:43PM I'm ...
0
votes
0answers
31 views

Compare ACF Date field to today or yesterday

This is a very simple question, but for some reason having challenges with it. I have set up ACF field group. I wanted to compare a "date field" to the current "today's date" and "yesterdays" date. ...
0
votes
1answer
28 views

How can get the last post date of the user?

I want to get the last post date was written by the user and here's the code that I have made but it's not working: function get_user_last_post_date( $user_id ) { $args = array( '...
0
votes
1answer
32 views

Possible to edit custom date field and display?

I would like my site to show the x time ago on posts but we also have lots of events listed that are effected by the sitewide change and are also showing x time ago dates too even if they are in the ...
0
votes
1answer
9 views

Get posts from year from URL

I've created a page that shows content from a specific year. The year will be defined in the url. Example url: https://mpdb.space/stats/tour/?year=2019 It works perfectly when I type year=2019 but ...
0
votes
0answers
30 views

can not get query to display post count by month of current custom taxonomy in custom taxonomy page

I am trying to display post count by month of current custom taxonomy in custom taxonomy page. but it display total count by month <?php $post_type = "sikayet"; $posts = get_queried_object()->...
1
vote
1answer
27 views

Update all comments time to random dates?

I found this code snippet which randomly changes all the dates for all posts. (Original Post : Update existing post dates to random dates ) <?php /** * Plugin Name: WPSE 259750 Random Dates * ...
1
vote
1answer
37 views

Some Custom Taxonomy modified dates return false

I have a custom taxonomy and when I call get_the_modified_date($term_id), some of the taxonomy terms return the date but others return false. Even if I go in and manually modify these taxonomies in ...
0
votes
0answers
37 views

get_queried_object not work in taxonomy page

I am trying to display post count by month of current custom taxonomy in custom taxonomy page. but it display total count by month <?php $post_type = "tesekkur"; $posts = get_queried_object()->...
0
votes
0answers
21 views

How would I go about removing the date from a WP Date Picker?

I am using WordPress Pods (which extends Custom Post Types & Taxonomy). What I am trying to do is remove the year so it reads: November 30th I guess I'd do this by running a function through ...
0
votes
1answer
34 views

I am trying to get cutom post cout by month of current taxonmy term

Hi please help me how can i display custom post count by month like this at current taxonomy page. **i have been trying to solve this problem aready 2 weeks. ** December 0 January 0 February 0 ...
1
vote
0answers
17 views

Month list with post count for current taxonomy term [closed]

please help me to create Month list with post count for current taxonomy term. Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. ...
1
vote
0answers
16 views

Post count by month of taxonmy term

Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. Example: January 24 February 43 March 5 April 6 and etc
0
votes
1answer
39 views

Use esc_attr() to print month name in French

I am working on a PHP code in which I want to display month name in French. <?php if (false !== strpos($translated_tz['diff'], '-')) { $ts = date_sub($altered_timestamp, ...
1
vote
0answers
100 views

Display post count by month of current taxonomy in archive page

Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. Example: January 24 February 43 March 5 April 6 and etc. This code is help ful ...
2
votes
0answers
41 views

get_queried_object error How to show post count by month in the taxonomy page

Can anyone help me please. i want to show custom post type count by month of taxonomy in archive page for current year. Example: January 24 February 43 March 5 April 6 and etc. This code is help ful ...
0
votes
0answers
64 views

How to make a custom search form with date range? (Using Timber)

I have to create a data range search for my site with two input (start-date, end-date). I'm using Timber and i have no idea how to do it. Here's my code in search controller. How can I implement this ...
0
votes
1answer
60 views

WordPress add_filter to post_date

I using a plugin that it makes posts and etc date to Persian Date but the problem is I just want to convert date in front not admin panel or etc. I found that part make this action: add_filter('...
1
vote
2answers
76 views

How to translate functions like get_the_date()?

My wordpress website has two languages. The theme translates properly, but whenever I use get_the_date it is in the default english language. How do I force the use of another language? The locale ...
0
votes
1answer
18 views

Can't convert ACF datepicker value to DateTime oject - gives me a boolean

I keep getting this error Call to a member function modify() on boolean with this code $date_value = the_sub_field( 'date_string' ); $date = DateTime::createFromFormat('d/m/Y', $date_value); $date-&...
0
votes
0answers
13 views

Date object in the query to show posts from the following month

I'm building a booking for events, each event is divided into taxonomies, this is the query that regulates my custom post type, to display all the posts that are under the "aperitivi" taxonomy. $...
0
votes
1answer
17 views

Changing Date Format on Custom Meta Data w/shortcode call

I am currently pulling a date from a users meta and making it so I can input a shortcode and it will show that date in certain places. I have the following code written and it works great! function ...
0
votes
1answer
23 views

Count time from registration date to today

I would like to add to the user profile the time from registration to the current day in the format: With us: 7 years 3 months 2 weeks 6 days OR With us: 1 year 1 month 1 week 1 day Me a bit ...
0
votes
0answers
21 views

Multiple orderby date arguments

I've had good luck with using multiple orderby arguments in the past, but now that I'm trying it with dates I'm wondering if there's something I'm missing. I'm trying to order some posts by an ACF ...
0
votes
0answers
25 views

Sort posts numerically by converted date format

Updated for clarity: I need to convert the post date format from Y-m-d to mdY and sort by mdY numerically, not by the actual timestamp. My goal is to order the posts by month first, then day, then ...
0
votes
2answers
63 views

How to get only present and past posts with post_date

An administrator wants to make posts for a future date but not visible for visitors. The posts come from a custom WP_Query inside my plugin so the basical WP behaviour does not work in this case. I ...
1
vote
1answer
42 views

Wordpress post dating - pre 1901?

I've created a wordpress blog locally hosted on a Raspberry Pi 4 4GB using a 500GB USB SSD. It works beautifully as an evernote replacement. I do have a problem with dating the posts however. I want ...
1
vote
1answer
67 views

How to break a date from ACF?

I need to print the number in one font, and the year in another <?php $timestamp = get_field('date_time'); ?> How to do it . help me please
0
votes
0answers
26 views

Last Update Date/Publish Date for Specific Categories

Is there a way to show the published date on one of my post categories and the last updated date on all the other categories? I've got a site with game reviews and would love these to display the ...
1
vote
1answer
110 views

Get Date of custom field and use conditional logic

I'm relatively new to Wordpress development and I'm trying to learn more about custom coding. For starters, I would like to know how to retrieve the date of a custom field and use conditional logic ...
0
votes
1answer
28 views

What date to use as a post date? date_gmt or modified_date_gmt

I am consuming a rest service with the posts, and get both date_gmt and modified_date_gmt ... What realy is the difference ? Is the modified_date a publish date also? Any way, if I am presenting ...
0
votes
1answer
36 views

How to add published date in product [closed]

I have on my site some products. My plan is to show some deals. But I want to show also the published date of the deal, the date that i have published the deal. Like a blogpost shows the published ...
0
votes
0answers
31 views

WP Query for all events prior to current date

I'm trying to display past and future events using a wordpress query. I'm able to query future events and even events that are on the same date as the current date. But, when i use less than or ...
0
votes
0answers
19 views

Need to display a Jan 1st post as the site's front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc

slightly unusual client request. I'm using Divi and I have a nice Divi layout created for a video and text post which is ready to go. The client wants to create 365 posts (one for each day of the year ...
0
votes
0answers
56 views

How to add “er” after particular days of the month in php?

I am working on a html/php code as shown below: <?php if(ICL_LANGUAGE_CODE=='fr'){ ?> /* When the page is in French */ <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y'...
0
votes
0answers
37 views

date_i18n in wordpress/php

I am working on a html/php code as shown below: HTML/PHP Code: <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y')) ?>" data-timezone="<?php echo esc_attr($tz_param) ?&...
0
votes
0answers
14 views

Custom shortcode sorted by meta date shows only current year and displays other language in date

I have this snippet in my functions.php. I thought it worked, but I noticed that it shows events only from this year (I have more events that are next year) and also, I can't get the date format to ...
1
vote
1answer
248 views

display month in french in wordpress/php?

I am working on a php code as shown below: <?php <time datetime="<?php echo esc_attr(date_format($ts, 'H:i d-m-Y')) ?>" data-timezone="<?php echo esc_attr($tz_param) ?>"><?...

1
2 3 4 5
10