ACC SHELL
<?php
/**
* Template Name: Mapa webu
*
* Description: Šablona pro zobrazení mapy webu
*
* @package WordPress
* @subpackage Laboserv2020
* @since Laboserv2020 1.0
*/
get_header(); ?>
<?php $postID = get_the_ID(); ?>
<div class="ordinary-page">
<div class="breadcrumbs">
<div class="content">
<ul>
<li><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Hlavní stránka</a></li>
<li><?php echo get_the_title( $postID ); ?></li>
</ul>
</div><!-- .content END -->
</div><!-- .breadcrumbs END -->
<article class="ordinary">
<div class="content">
<header>
<?php
echo '<h1>'.get_the_title( $postID ).'</h1>';
?>
</header>
<div class="post-content">
<?php the_content( $postID ); ?>
<?php
//echo $postID;
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'post_parent' => 0,
'post__not_in' => array( $postID, 7429 ),
'posts_per_page' => -1,
'order_by' => 'menu_order',
'order' => 'ASC'
);
// The Query
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() )
{
echo '<ul class="web-map">';
while ( $the_query->have_posts() )
{
$the_query->the_post();
echo '<li id="page-'.get_the_ID().'"><a href="'.get_the_permalink().'">'.get_the_title().'</a>';
getChildren( get_the_ID() );
echo '</li>';
}
echo '</ul>';
}
else
{
// no posts found
}
function getChildren( $ID )
{
$args = array(
'post_type' => 'page',
'post_status' => 'publish',
'post_parent' => $ID,
'posts_per_page' => -1,
'order_by' => 'menu_order',
'order' => 'ASC'
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() )
{
echo '<ul>';
while ( $the_query->have_posts() )
{
$the_query->the_post();
echo '<li id="page-'.get_the_ID().'"><a href="'.get_the_permalink().'">'.get_the_title().'</a>';
getChildren( get_the_ID() );
echo '</li>';
}
echo '</ul>';
}
else
{
// no posts found
}
}
?>
</div>
</div><!-- .content -->
</article>
</div><!-- .ordinary-page END -->
<div class="textarea">
<div class="content">
<section class="news-posts">
<h1>Aktuálně</h1>
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => 5,
'category__not_in' => array( 14 )
);
// Create the new query
$news_posts = new WP_Query( $args );
// vypis produktu
while ( $news_posts->have_posts() )
{
$news_posts->the_post();
global $post;
$postID = $post->ID;
echo '<article class="news-post">';
echo '<h1><a href="'.get_the_permalink( $postID ).'">'.get_the_title( $postID ).'</a></h1>';
echo '<p class="excerpt">'.get_the_excerpt( $postID ).'</p>';
$categories = get_the_category( $postID );
//print_r( $categories );
echo '<footer><span class="date">'.get_the_date( 'j. F Y', $postID ).'</span> •';
foreach( $categories as $cat )
{
echo ' <a href="'.get_category_link( $cat ).'" class="category">'.strtolower( $cat->name ).'</a>';
}
echo '</footer>';
echo '</article>';
}
?>
<a href="" class="more-news">archiv aktualit</a>
</section><!-- .news-posts END -->
<section class="about-company">
<div class="text">
<?php
if ( is_active_sidebar( 'about-company' ) )
{
dynamic_sidebar( 'about-company' );
}
?>
</div><!-- .text END -->
<h1>Kontakt</h1>
<h2>Kde nás najdete?</h2>
<div class="left-side">
<img src="<?php echo get_template_directory_uri(); ?>/images/fotografie-sidla.jpg" alt="fotografie sídla Laboserv s.r.o." class="photo" />
<span class="iso">
<img src="<?php echo get_template_directory_uri(); ?>/images/iso-icon.png" alt="ISO ikona" />
<p>ISO 9001 a 14001<br/>
certifikovaná<br/>
společnost</p>
</span>
</div><!-- .left-side END -->
<div class="right-side">
<article class="address">
<?php
if ( is_active_sidebar( 'company-address' ) )
{
dynamic_sidebar( 'company-address' );
}
?>
</article>
<a href="" class="link-button">identifikace společnosti</a><br/>
<a href="" class="link-button">kariéra u nás</a>
</div><!-- .right-side END -->
</section>
</div><!-- .content END -->
</div><!-- #textarea END -->
<?php //get_sidebar();
?>
<?php get_footer(); ?>
ACC SHELL 2018