Date not working correctly

What you did wrong here is the part date(‘d’, $rem_days). The function date() should be used to convert timestamp to a formatted date, not to converting a time difference in timestamp to time difference in days. You can fix this by replacing date(‘d’, $rem_days) with floor($rem_days/86400). The complete code should be: $event_date = strtotime( get_field( … Read more

What might cause two dates to appear on a blog post?

Some WordPress templates show the published and updated dates side by side. For example, https://bootscore.me/ does this and separates the two with a forward slash. If you want to fix this then in the child theme you override the date function. So with bootScore in particular you would take this function: function bootscore_date() { $time_string … Read more

How to remove the hyperlink from all post dates where when you mouseover over the post date, a hyperlink displays like- “…com/2023/08/“

You can use the Site Editor. For the TwentyTwentyThree theme, you can find the option to disable the link with the steps below. A different template my require a different path through the template blocks or a child theme as suggested by Jacob Peattie in the Comments. Single posts Navigate to the Site Editor page … Read more

Different date time in results of search

All the date functions reference the global $post variable, but from your code the $post variable is not being used, so that’s why the date is wrong. Try this (untested): foreach ( $total_results as $tr ) { echo get_the_time( ‘j F Y, G:i’, $tr ); }

WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)

Resolved. My error are there : $FirstDayThisMonth[] = date(‘Y-m-01 00:00:01’, mktime(0, 0, 0, $x, 1)); $LastDayThisMonth[] = date(‘Y-m-t 23:59:59’, mktime(0, 0, 0, $x, 1)); instead of : $datestart = strtotime(date(‘Y-‘.$nbofmonth.’-01 00:00:01′)); $dateend = strtotime(date(‘Y-‘.$nbofmonth.’-t 23:59:59′)); It’s always very annoying to have well written code and to realize that a small element breaks everything

tech