I have the following code, i'm not sure having context of what happens within the while loop is hugely important. The issue lies with the continue; in the if statement. The condition in the if is met, and so continue; is reached. this created an infinite loop though. I can not understand why this is the case though?
Could anyone suggest why WordPress can not handle a continue; in a WP_Query loop?
while ($latest_events->have_posts()) {
$id = get_the_ID();
$custom_fields = base_get_all_custom_fields($id);
$event_type = $custom_fields["course/event_type"][0];
if(isset($event_type) && strpos_arr($event_type, array('Training')) !== false ){
continue;
}
$latest_events->the_post();
get_template_part('partials/latest-espresso-events');
}