Sorting past events by month

Using query_posts is pretty much always a bad idea as it causes another database query but it also will break pagination and can cause other issues as well. What you need it a filter on pre_get_posts. function pgp($qry) { if (!is_admin() && is_main_query() && $qry->is_category(3709)) { $qry->set(‘orderby’,’meta_value’); $qry->set(‘meta_key’,’Deadline’); //formatted YYYYMMDD $qry->set(‘ignore_sticky_posts’,true); } return $qry; } … Read more

Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?

There’s no native “Time Interval” field type in ACF, but you could: Use a third-party custom field like the “Date Range Picker” provided by ACF Extended (it’s a commercial plugin that adds features to ACF). Use 2 distinct native Date Picker fields for “from” and “to”, possibly inserted inside a Group. You may take advantage … Read more

get_the_date() return always UTC+0 [duplicate]

date_default_timezone_set can alter the output of a new DateTime. Not sure how it will affect get_the_time. $date = new DateTime( get_the_time(‘c’) ); $date->setTimezone(new DateTimeZone(‘Europe/Warsaw’)); echo $date->format(‘c’); $date = new DateTime(); echo $date->format(‘c’); // 2015-12-18T18:21:31+00:00 $date->setTimezone(new DateTimeZone(‘Europe/Warsaw’)); echo $date->format(‘c’); // 2015-12-18T19:21:31+01:00 date_default_timezone_set(‘Europe/Warsaw’); $date = new DateTime(); echo $date->format(‘c’); // 2015-12-18T19:21:31+01:00

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedusedueduseduedusedueduseduedu