<?php
/**
* The template used to display Tag Archive pages
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
Template Name: Tag Page*/
get_header(); ?>
<div class="content">
<div class="main">
<div class="leftpart">
<div class="navigation">
<?php if(function_exists('bcn_display'))
{
bcn_display();
}?>
</div>
<div class="tourslist">
<div>
<ul>
<li class="tourslist_li" style="list-style:none">
<div class="tourheadding" style="background:none">
<div class="headdingleft">
<h3>
<?php echo "Архив Тегов: ". $term; ?>
</h3>
</div>
<div class="tourprice helvetica-neue-light">
</div>
</div>
</li>
</ul>
</div>
<?php if ( have_posts() ) : ?>
<ul>
<?php
while (have_posts() ) : the_post();
//global $post;
//$pst_id = $post->ID;
?>
<?php $meta = get_post_meta($post->ID, 'abg_tours_download_brochure', true); ?>
<?php $tourimg = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) ,'list-thumb'); ?>
<li class="tourslist_li" style="list-style:none">
<div class="tourheadding">
<div class="headdingleft">
<h3><a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a> </h3>
<p><?php echo get_post_meta($post->ID,'abg_tours_days_nights',true); ?></p>
</div>
<div class="tourprice helvetica-neue-light">
<?php if(get_post_meta($post->ID,'abg_tours_price',true)) { ?>
<img src="<?php bloginfo('template_url'); ?>/images/from_ru.png" /> $<?php echo get_post_meta($post->ID,'abg_tours_price',true);?>
<?php } ?>
</div>
</div>
<div class="toursdetail">
<?php if($tourimg[0]) {?><div class="placeimage"><a href="<?php the_permalink(); ?>"> <span class="newimg"></span>
<img src="<?php echo $tourimg[0]; ?>" width="241" height="139" alt="" /> </a> </div><?php } ?>
<div class="<?php if($tourimg[0]) {?>toursright<?php }else{ ?>toursright2<?php } ?>">
<div class="citylist">
<p><strong>Тип Тура:</strong></p>
<p>
<?php $terms = get_the_terms($post->ID, 'tourstype');
$types = '';
foreach($terms as $tourtype ){
if($tourtype->taxonomy == 'tourstype' ){
$types[] = $tourtype->name;
}
}
echo implode(", ",$types);
?>
</p>
</div>
<div class="citylist">
<p><strong>Города:</strong></p>
<p>
<?php $terms1 = get_the_terms($post->ID, 'tourscat');
$cities = '';
foreach($terms1 as $tourcity ){
$cities[] = $tourcity->name;
}
echo implode(", ",$cities);
?>
</p>
</div>
<div class="description">
<h5>Описание:</h5>
<p><?php echo substr(get_the_content(),0,145); ?></p>
</div>
<div class="tourshare"> <span class='st_email_large' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Отправить имайл' style="float:left; padding-top:6px !important;">Отправить имайл</span> <span class="float-left" style="padding-top:5px !important;">|</span> <span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' style="padding-left:-10px;" displayText='Поделиться'></span> <span class="float-left" style="padding-top:5px !important;">|</span> <a href="<?php the_permalink(); ?>" class="moredetail">Детали Тура</a> </div>
</div>
</div>
</li>
<!-- #post-<?php the_ID(); ?> -->
<?php endwhile; // end of the loop. ?>
</ul>
<?php else : ?>
<ul>
<li class="tourslist_li" style="list-style:none; min-height:200px;">
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title">
<?php _e( 'Nothing Found', 'twentyeleven' ); ?>
</h1>
</header>
<!-- .entry-header -->
<div class="entry-content">
<p>
<?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?>
</p>
<?php get_search_form(); ?>
</div>
<!-- .entry-content -->
</article>
<!-- #post-0 -->
</li>
</ul>
<?php endif;
?>
</div>
<div class="pagi" style="position:relative">
<?php //kriesi_pagination(); ?>
<?php wp_pagenavi();
?>
</div>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>