File: /var/www/sites/u-port.ua/wp-content/themes/customize/single.php
<?php get_header(); ?>
<div class="side-bar-btn-wrap">
<div class="side-bar-btn">
<span class="top-arrow"></span>
<span class="bot-arrow"></span>
</div>
</div>
<div class="container-fluid fail-bg footer-down">
<div class="row">
<div class="container">
<div class="row">
<?php
if( (in_category(4) xor is_single(50)) || (in_category(61) xor is_single(91)) ){ ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<h1 class="single-title"><?php the_title(); //это был тег p ?></h1>
<!--<h1><?php //the_field(h1); ?></h1>-->
<?php if (is_single(46) || is_single(17983)) { ?>
<div class="button-instruction clearfix single-product-wrap-content">
<a class="pull-right" href="<?php the_field("kerivnitstvo"); ?>" target="_blank"><?php _e("Завантажити керівництво", "customize"); ?></a>
</div>
<?php } ?>
<div class="single-content">
<?php the_content(); // Содержимое страницы ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
<?php
} elseif ( in_category(1) || in_category(53) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<p class="single-title"><?php echo get_cat_name(1);?></p>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<?php $value = get_field( "h1" ); if( $value ) { ?>
<h1><?php the_field("h1"); ?></h1>
<p class="date"><?php the_time('d');?>.<?php the_time('m');?>.<?php the_time('Y');?></p>
<?php } else { ?>
<p class="date"><?php the_time('d');?>.<?php the_time('m');?>.<?php the_time('Y');?></p>
<h1 class="master-title"><?php the_title();?></h1>
<?php } ?>
<div class="single-thumb-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="single-content">
<?php the_content(); // Содержимое страницы ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
<?php
} elseif ( in_category(50) || in_category(91) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<!-- <div class="breadcrumbs">
<a href="http://u-port.ua"><?php _e("Головна", "customize") ?></a> >
<a href="<?php echo get_category_link(50); ?>" rel="category tag"><?php echo get_cat_name(50);?></a> >
<?php the_title();?>
</div> -->
<?php
$cn = 50;
if(in_category(91)) {$cn = 91;}
?>
<p class="single-title"><?php echo get_cat_name($cn);?></p>
<!-- <h1><?php // the_field(h1); ?></h1> -->
<p class="date"><?php the_time('d');?>.<?php the_time('m');?>.<?php the_time('Y');?></p>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<h1 class="master-title"><?php the_title();?></h1>
<div class="single-thumb-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="clearfix"></div>
<div class="single-content">
<?php the_content(); // Содержимое страницы ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
<?php
} elseif ( in_category(51) || in_category(60) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<!-- <div class="breadcrumbs">
<a href="http://u-port.ua"><?php _e("Головна", "customize") ?></a> >
<a href="<?php echo get_category_link(51); ?>" rel="category tag"><?php echo get_cat_name(51);?></a> >
<?php the_title();?>
</div> -->
<?php
$cn = 51;
if(in_category(60)) {$cn = 60;}
?>
<p class="single-title"><?php echo get_cat_name($cn);?></p>
<!-- <h1><?php // the_field(h1); ?></h1> -->
<p class="date"><?php the_time('d');?>.<?php the_time('m');?>.<?php the_time('Y');?></p>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<h1 class="master-title"><?php the_title();?></h1>
<div class="single-thumb-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="clearfix"></div>
<div class="single-content">
<?php the_content(); // Содержимое страницы ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
<?php
} elseif ( is_single(50) || is_single(17973) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<p class="single-title"><?php the_title();?></p>
<h1><?php the_field("h1"); ?></h1>
<div class="show-btns-wrap">
<p class="show-all-btn"><?php _e("Показати всі", "customize"); ?></p>
<p class="hide-all-btn"><?php _e("Сховати всі", "customize"); ?></p>
</div>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<div class="single-thumb-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="faq-content">
<?php the_content(); // Содержимое страницы ?>
</div>
<?php endwhile; // Конец цикла ?>
</div>
<?php
// Вывод документа
} elseif ( in_category(7) || in_category(62) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad doc8">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<?php
$cn = 7;
if(in_category(62)) {$cn = 62;}
?>
<p class="single-title"><?php echo get_cat_name($cn);?></p>
<h1><?php the_title(); //the_field(h1); ?></h1>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<div class="doc-thumb-img-wrap"><a target="_blank" href="<?php the_field("docPdfFile");?>"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(full); } // Проверяем наличие миниатюры, если есть показываем ?></a>
<h3 class="doc-title"><?php the_title();?></h3>
<h3 class="doc-title"><?php the_field("docDesc"); ?></h3>
</div>
<div class="eng-img-wrap">
<a target="_blank" href="<?php the_field("pdfEng"); ?>"><img src="<?php the_field("fotoEng"); ?>" alt=""></a>
<h3 class="doc-title"><?php the_field("fotoengtext"); ?></h3>
</div>
<div class="docs-content">
<?php the_content(); // Содержимое страницы ?>
</div>
<?php endwhile; // Конец цикла ?>
</div>
<?php
//Категория для пациентов
} elseif ( (in_category(5) xor is_single(140) xor is_single(142)) || (in_category(63) xor is_single(17947) xor is_single(17942)) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<p class="single-title"><?php the_title();?></p>
<?php if (is_single(1279) || is_single(17411)) { ?>
<div class="button-instruction clearfix single-product-wrap-content">
<a class="pull-right" href="<?php the_field("mapFile"); ?>" target="_blank"><?php _e("Завантажити карту", "customize"); ?></a>
<a class="pull-right" href="<?php the_field("journalFile"); ?>" target="_blank"><?php _e("Завантажити журнал", "customize"); ?></a>
</div>
<?php } ?>
<h1><?php the_field("h1"); ?></h1>
<div class="single-content">
<?php the_content(); // Содержимое страницы ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
<?php
//ВЫвод вопросов для пациентов
} elseif ( is_single(140) || is_single(17947) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<p class="single-title"><?php the_title();?></p>
<h1><?php the_field("h1"); ?></h1>
<div class="show-btns-wrap">
<p class="show-all-btn"><?php _e("Показати всі", "customize"); ?></p>
<p class="hide-all-btn"><?php _e("Сховати всі", "customize"); ?></p>
</div>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<div class="single-thumb-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="faq-content">
<?php the_content(); // Содержимое страницы ?>
</div>
<?php endwhile; // Конец цикла ?>
</div>
<?php
//ВЫвод котакт формы для пациентов
} elseif ( is_single(142) || is_single(17942) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<p class="single-title"><?php the_title();?></p>
<h1><?php the_field("h1"); ?></h1>
<h3 class="questions"><?php _e("З'явилися питання?", "customize"); ?></h3>
<p class="questions-text"><?php _e("Напишіть нам і ми дамо вам відповідь якомога швидше.", "customize"); ?></p>
<?php if (get_locale() == 'uk') { ?>
<?php echo do_shortcode('[contact-form-7 id="1004" title="Обратная связь для пациентов"]'); ?>
<?php } else { ?>
<?php echo do_shortcode('[contact-form-7 id="872afbb" title="Обратная связь для пациентов"]'); ?>
<?php } ?>
</div>
<?php
//карточка товара
} elseif ( in_category(6) || in_category(90) ) { ?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-12 move-bar">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12 inner-pad">
<?php if (function_exists('breadcrumb_trail')) { breadcrumb_trail(); } ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); // Начало цикла ?>
<p class="single-title"><?php the_title();?></p>
<h1><?php the_field("h1"); ?></h1>
<div class="single-product-wrap-content clearfix">
<div class="row">
<div class=" col-lg-6 col-md-6 col-sm-6">
<div class="single-prod-img-wrap"><?php if ( has_post_thumbnail() ) { the_post_thumbnail('full'); } // Проверяем наличие миниатюры, если есть показываем ?>
</div>
<div class="pdf-btn">
<?php if ( is_single(177) || is_single(17931) ) { ?>
<a href="<?php the_field("pdf"); ?>" target="_blank"><?php _e("Завантажити листівку", "customize"); ?></a>
<a href="<?php the_field("pdf2"); ?>" target="_blank"><?php _e("Завантажити інструкцію", "customize"); ?></a>
<?php } else { ?>
<a href="<?php the_field("pdf"); ?>" target="_blank"><?php _e("Завантажити інструкцію", "customize"); ?></a>
<?php } ?>
</div>
</div>
<div class=" col-lg-6 col-md-6 col-sm-6"><?php the_field("char1"); ?></div>
</div>
<div class="row">
<div class=" col-lg-6 col-md-6 col-sm-6"><?php the_field("char2"); ?></div>
<div class=" col-lg-6 col-md-6 col-sm-6"><?php the_field("char3"); ?></div>
</div>
<div class="row">
<div class="col-lg-12">
<?php the_content(); ?>
<?php endwhile; // Конец цикла ?>
</div>
</div>
</div>
</div>
</div>
<?php
} else { ?>
<?php
}
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>