$all_meets->the_post(); $start = get_field("meet_start_time"); $end = get_field("meet_end_time"); $meet_length += $end - $start; } $meet_length = round($meet_length / 60 / 60); // Meet categories $meet_categories = get_categories(); // Meet staff $all_staff = new WP_Query('post_type=meet_runner&posts_per_page=-1&orderby=title&order=ASC'); $meet_staff = array(); if ($all_staff->have_posts()) { while ($all_staff->have_posts()) { $all_staff->the_post(); if (get_field("runner_staff") == true) { $meet_staff[] = array("name" => get_the_title(), "avatar" => sb_profile_avatar(get_the_ID()), "biography" => sb_profile_biography(get_the_ID()), "email" => get_field("runner_email"), "links" => get_field("runner_links")); } } } if (have_posts()) { while (have_posts()) { the_post(); ?> <main class="main page-about" id="content" role="main"> <div class="page-about__media"> <?php if (has_post_thumbnail()) { echo sb_responsive_image_helper(get_post_thumbnail_id(), "page-about__image"); } ?>
<?php get_template_part('partials/global/html-header'); get_template_part('partials/global/header'); if (have_posts()) { while (have_posts()) { the_post(); // Runners $meet_runner = get_field("meet_runner"); $meet_runners_count = count($meet_runner) > 4 ? 4 : count($meet_runner); $meet_runners = array(); foreach ($meet_runner as $runner) { $meet_runners[] = array("id" => $runner, "name" => get_the_title($runner), "avatar" => sb_profile_avatar($runner), "email" => get_field("runner_email", $runner)); } // Location $meet_location = sb_meet_location(get_field("meet_location")); // Media if (has_post_thumbnail()) { $meet_image = sb_responsive_image_helper(get_post_thumbnail_id(), "meet__image"); $meet_image_copyright = get_featured_image_copyright(); } else { $meet_image = '<div class="meet__map" data-map="' . $meet_location["latitude"] . ',' . $meet_location["longitude"] . '"></div>'; } ?> <main class="main" id="content" role="main"> <article class="meet" itemscope itemtype="http://schema.org/Event"> <meta itemprop="url" content="<?php the_permalink(); ?> ">