WP_Query outputs wrong post in custom post type

This has been solved. add_action(‘admin_head’, ‘set_scheduled_today_tag’, 99); function set_scheduled_today_tag() { global $post; $args = [ ‘post_type’ => ‘wp_events’, ‘post_status’ => ‘any’, ‘numberposts’ => -1 ]; $posts = get_posts($args); if ($posts) { foreach ($posts as $post) { setup_postdata($post); $post_date = get_the_date(‘Y/m/d’, get_the_ID()); date_default_timezone_set(‘America/Chicago’); $current_date = date(‘Y/m/d’); if ($post_date === $current_date) { wp_set_object_terms(get_the_ID(), ‘today’, ‘event_tag’, true); } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)