| Server IP : 82.208.35.60 / Your IP : 216.73.217.116 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
/**
*
* Template Name: Pricelist Template
*
* @package Sofident
*/
get_header();
?>
<div id="primary" class="content-area container">
<main id="main" class="site-main row single-service" role="main">
<div class="col-xs-12 col-sm-8 wow fadeIn">
<section class="accordion" id="accordionPrices">
<?php
$terms = get_terms(array(
'taxonomy' => 'department',
'hide_empty' => false,
));
if (!empty($terms) && !is_wp_error($terms)) {
$count = 0;
foreach ($terms as $term) {
?>
<article class="card">
<div class="card-header" id="h-<?php echo $term->slug; ?>">
<h2 type="button" data-toggle="collapse" <?php if ($count == 0) echo "aria-expanded=\"true\" "; ?> data-target="#c-<?php echo $term->slug; ?>" aria-controls="c-<?php echo $term->slug; ?>"><?php echo $term->name; ?><span class="icon-close"></span></h2>
</div>
<div id="c-<?php echo $term->slug; ?>" class="collapse <?php if ($count == 0) echo "in"; ?>" aria-labelledby="h-<?php echo $term->slug; ?>" data-parent="#accordionPrices">
<div class="card-body">
<?php
$args2 = array(
'posts_per_page' => -1,
'post_type' => 'service',
'tax_query' => array(
array(
'taxonomy' => 'department',
'field' => 'slug',
'terms' => $term->slug
)
)
);
$posts = get_posts($args2);
foreach ($posts as $post) : setup_postdata($post);
?>
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php include( 'template-parts/box-price.php' ); ?>
<?php
endforeach;
wp_reset_postdata();
?>
</div>
</div>
</article>
<?php
$count++;
}
} ?>
</section>
</div>
<aside id="secondary" class="widget-area col-xs-12 col-sm-4" role="complementary">
<section id="call-use" class="widget">
<h3 class="wow fadeInDown"><?php _e('Objednat se', 'sofident'); ?> </h3>
<strong id="phone-number" class="wow fadeInUp">+420 777 134 305</strong>
</section>
<section id="subform" class="widget white-back">
<h3 class="wow fadeInDown"><?php _e('Objednat se', 'sofident'); ?> </h3>
<?php if (ICL_LANGUAGE_CODE == 'en') { ?>
<?php echo do_shortcode('[contact-form-7 id="560" title="Request page EN"]'); ?>
<?php } elseif (ICL_LANGUAGE_CODE == 'ru') { ?>
<?php echo do_shortcode('[contact-form-7 id="559" title="Request page RU"]'); ?>
<?php } else { ?>
<?php echo do_shortcode('[contact-form-7 id="558" title="Request page CS"]'); ?>
<?php } ?>
</section>
<?php
$offer = get_field('selected_offer');
if ($offer):
// override $post
$post = $offer;
setup_postdata($post);
?>
<section id="widget-offer" class="widget">
<div style="background: url('<?php the_post_thumbnail_url(); ?>') center left 60px no-repeat">
<h2 class="wow fadeInDown"><?php the_title(); ?></h2>
<a class="btn btn-orange wow fadeInUp" href="<?php the_field('offer_link'); ?>"><?php _e('Objednat', 'sofident'); ?></a>
</div>
</section>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>
<?php get_sidebar(); ?>
</aside>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();