retrieve post details in loop
First, change those = to === as mentioned by @sally-cj in the comment. On top of that, you’re saving the status as a variable called $stat and are then checking it as $status. So you might want to change $stat = get_post_status($job->ID); into $status = get_post_status($job->ID);. Or better: the $job is already populated with a … Read more