I have a custom post type called ‘aktualitates’ and I have a date picker field on the posts from the Advanced Custom Fields plugin with the field name ‘aktuali_expire’. I tried adding a code from another question to functions.php, but it doesn’t seem to work for me. I am positive, that the time values are […]
- Tags 'compare' => '=', 'delete_expired_events' ); function delete_expired_events() { $args = [ 'post_type' => 'aktualitates', 'fields' => 'ids', 'posts_per_page' => -1, 'value' => current_time( 'Y-m-d' ), //only get post id's 'meta_query' => [ [ 'key' => 'aktuali_expire', as shown in the code from this question, but after hours it didn't seem to trigger.. add_action( 'init', but it doesn't seem to work for me. I am positive, I have a custom post type called 'aktualitates' and I have a date picker field on the posts from the Advanced Custom Fields plugin with the f, that the time values are both set to Y/m/d in this code and in ACF field settings. I also tried setting the action as scheduled