endif;
<?php
$number = 0;
$doctors = array();
?>
<?php foreach($categories as $category): ?>
<?php $staff = get_pages(array('parent' => $category->ID)); ?>
<li>
<div class="uk-position-relative uk-visible-toggle uk-light doctors_tab_slider" tabindex="-1" uk-slider>
<div class="uk-slider-container">
<ul class="uk-slider-items" uk-switcher="connect: #component-nav;">
<?php foreach($staff as $doctor): ?>
<?php $doctors[] = $doctor; ?>
<?php $image = get_field('doctor_image', $doctor->ID); ?>
<li class="uk-width-1-6 centred-items" data-number=<?php echo $number++; ?>>
<div class="uk-position-center uk-panel slider__wrap uk-flex uk-flex-center">
<div class="inner__wrap"><img class="round__slider" src="<?php echo $image ?>"></div>
</div>
<h4 class="title is-6"<a href="<?php echo get_page_link( $doctor->ID ); ?>"><?php echo $doctor->post_title; ?></a></h4>
<p class="title is-7"><?php the_field( 'doctor_education' ); ?></p>
</li>
<?php endforeach; ?>
</ul>
</div><a class="uk-position-center-left uk-position-small header__arrow-pref" href="#" uk-slider-item="previous">
<svg class="icon" width="26px" height="33px">
<use xlink:href="#icon-prev"></use>
</svg></a><a class="uk-position-center-right uk-position-small header__arrow-next" href="#" uk-slider-item="next">
<svg class="icon" width="26px" height="33px">
<use xlink:href="#icon-next"></use>
</svg></a>
<ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin"></ul>
</div>
</li>
<?php wp_reset_postdata(); ?>
<?php endforeach; ?>
$staff = get_pages(array());
foreach ($staff as $staffs);
<div>the_field('название поля', $staffs->ID)</div>
<input type="radio" name="contact-1" value="exchange">
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST['formData'])) {$formData = $_POST['formData'];}
if (isset($_POST['contact-1'])) {$contactForm = $_POST['contact-1'];}
if (isset($_POST['contact'])) {$social = $_POST['contact'];}
if (isset($_POST['mail'])) {$mail = $_POST['mail'];}
$to = "email"; /*Укажите ваш адрес электронной почты*/
$headers = "Content-type: text/plain; charset = utf-8";
$subject = "opisanie";
$message = "";
$send = mail ($to, $subject, $message, $headers);
if ($contactForm == "exchange"){
header("Location: url");
}else if ($contactForm = "eccomerce"){
header("https:url");
}
?>