I have an WordPress app in which I use ACF plugin with a lot of custom post type. For example I will take one custom post type named “Events” now I have an php code that makes get request on external api and with response I import as a new posts inside custom post type. But my problem is with showing on front end of this posts. In admin panel of this custom post type i see the list of imported posts with all maped fields and with published status but in front end i can’t see this posts, I see the message “There are no past events yet.” . Most interesting, I have 3 stages: Localhost , staging and production and this problem is only in Production. I checked all wordpress settings and all date format , for all 3 stages the settings is the same 100%, but in production I have this problem.
$argsPast = array(
'post_type' => 'event',
'posts_per_page' => 6,
'meta_key' => 'start_date',
'orderby' => 'meta_value',
'order' => 'DESC',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'start_date',
'value' => $first_day_of_month,
'compare' => '<=',
'type' => 'DATE'
),
array(
'key' => 'end_date',
'value' => $first_day_of_month,
'compare' => '<=',
'type' => 'DATE'
)
),
);
This is my args for get request to show in frontend page and this code is setted for all 3 stages : localhost, staging , production and the problem is only on production.
user25296157 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.