| Server IP : 82.208.35.60 / Your IP : 216.73.216.238 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/d2m/sofident_cz/wp-content/themes/sofident/ |
Upload File : |
<?php
/**
* The template for displaying archive pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Sofident
*/
get_header();
$dep_id = get_queried_object_id();
?>
<div class="container">
<div class="row">
<div class="col-xs-12 home-intro">
<h1 class="margin-top-50"><?php single_term_title(); ?> <strong><?php _e('Poskytované služby', 'sofident'); ?></strong></h1>
<ul id="departmentSlider" class="on-taxonomy">
<?php
$args_services = array(
'posts_per_page' => -1,
'post_type' => 'service',
'tax_query' => array(
array(
'taxonomy' => 'department',
'field' => 'id',
'terms' => $dep_id
)
)
);
$services = get_posts($args_services);
foreach ($services as $post) : setup_postdata($post);
?>
<li>
<?php
$image = get_the_post_thumbnail_url($post->ID, 'thumbnail');
$smallImage = get_the_post_thumbnail_url($post->ID, 'lazy');
$alt = get_the_title();
lazyImage($image, $smallImage, $alt, $classes = 'img-responsive');
?>
<div class="text-center dep-over">
<h2><?php echo $alt; ?></h2>
<p><?php echo wp_trim_words(get_the_content(), 20, '...'); ?></p>
<a href="<?php the_permalink(); ?>" class="btn btn-gray btn-sm"><?php _e('Čtěte více', 'sofident'); ?></a>
</div>
</li>
<?php
endforeach;
wp_reset_postdata();
?>
</ul>
</div><!-- /.col-sm-12 -->
</div><!-- /.row -->
</div><!-- /.container -->
<?php
$args = array(
'posts_per_page' => 1,
'post_type' => 'offers',
'tax_query' => array(
array(
'taxonomy' => 'department',
'field' => 'id',
'terms' => $dep_id
)
)
);
$posts = get_posts($args);
foreach ($posts as $post) : setup_postdata($post);
$offerSmall = get_the_post_thumbnail_url($post->ID, 'lazy');
$offerFull = get_the_post_thumbnail_url($post->ID, 'medium_large');
include( 'template-parts/offer.php' );
endforeach;
wp_reset_postdata();
?>
<div id="primary" class="content-area container">
<main id="main" class="site-main row" role="main">
<div class="col-xs-12 col-sm-8 col-sm-offset-2 taxonomy-intro">
<h1><?php single_term_title(); ?><strong><?php _e('Stomatologie Praha 5', 'sofident'); ?></strong></h1>
<?php the_archive_description('<div class="text-center">', '</div>'); ?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
$contact_type = 'department';
include('template-parts/request-cover.php');
?>
<div class="container" id="prices">
<div class="row">
<div class="col-xs-12 home-intro">
<h1 class="margin-top-50"><?php single_term_title(); ?><?php _e(' cenik', 'sofident'); ?> <strong><?php _e('Poskytované služby', 'sofident'); ?></strong></h1>
<div class="row">
<?php
foreach ($services as $post) : setup_postdata($post);
?>
<div class="col-xs-12 col-sm-4">
<h2><?php the_title(); ?></h2>
<?php include( 'template-parts/box-price.php' ); ?>
</div>
<?php
endforeach;
wp_reset_postdata();
?>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<a href="#" class="btn btn-orange btn-lg"><?php _e('Objednat', 'sofident'); ?></a>
</div>
</div>
</div>
</div>
</div>
<?php
get_footer();