Exclude empty fields from custom field calculation (Average)
Just tell the loop to continue if the custom field is 0 or blank. if ((get_post_meta($post->ID,’60mins’,true))||/*however it returns as blank*/) { continue; } This will prevent it from being factored into the average.