<?php
/*
Template Name: Region :: Europe
*/
?>
<?php get_header();
$prefix = 'tk_';
?>
<!-- TITLE PAGE -->
<div class="slider-content left">
<div class="wrapper">
<div class="bg-title-page left">
<div class="title-page left"><?php the_title()?></div><!--/title-page-->
</div><!--/bg-title-page-->
</div><!--/wrapper-->
</div><!--/slider-content-->
<!-- CONTENT -->
<div class="content left">
<div class="wrapper">
<div class="bg-content left">
<div class="content-full left">
<div class="shortcodes left">
<div class="alert info">
<?php
/* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
//get_template_part( 'loop', 'page' );
wp_reset_query();
if ( have_posts() ) : while ( have_posts() ) : the_post();
the_content();
endwhile;
else:
endif;
wp_reset_query();
?>
</div>
<br/><br/>
<?php
$terms = get_terms("tagportfolio");
$count = count($terms);
echo '<ul id="portfolio-filter">';
echo '<li><a href="#all" title="">All</a></li>';
if ( $count > 0 ){
foreach ( $terms as $term ) {
$termname = strtolower($term->name);
$termname = str_replace(' ', '-', $termname);
echo '<li><a href="#'.$termname.'" title="" rel="'.$termname.'">'.$term->name.'</a></li>';
}
}
echo "</ul>";
?>
<?php
$loop = new WP_Query(array('post_type' => 'europe', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'asc'));
$count =0;
?>
<div id="portfolio-wrapper">
<ul id="portfolio-list">
<?php if ( $loop ) :
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php
$terms = get_the_terms( $post->ID, 'tagportfolio' );
if ( $terms && ! is_wp_error( $terms ) ) :
$links = array();
foreach ( $terms as $term )
{
$links[] = $term->name;
}
$links = str_replace(' ', '-', $links);
$tax = join( " ", $links );
else :
$tax = '';
endif;
?>
<?php $infos = get_post_custom_values('_url'); ?>
<li class="portfolio-item <?php echo strtolower($tax); ?> all">
<div style="margin:0 17px 0 0;"class="color-buttons color-button-black left"><a style="padding:3px 6px 3px; font-size:8px;" href="#"> <?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?> </a></div><hr class="churches">
<h3 class="church"><?php the_title(); ?></h3>
<?php the_content(); ?></br class="clear">
<?php if ($infos) { ?>
<div class="color-buttons color-button-blue website"><a href="http://<?php echo $infos[0]; ?>" target="_blank">Website →</a></div>
<?php } ?>
</li>
<?php endwhile; else: ?>
<li class="error-not-found">Sorry, no portfolio entries for while.</li>
<?php endif; ?>
</ul>
<div class="clearboth"></div>
</div> <!-- end #portfolio-wrapper-->
<script>
jQuery(document).ready(function() {
jQuery("#portfolio-list").filterable();
});
</script>
</div><!-- /shortcodes-right -->
</div><!--/content-full-->
</div><!--/bg-content-->
<div class="help-content-down left"></div><!--/help-content-down-->
</div><!--/wrapper-->
</div><!--/content-->
<?php get_footer(); ?>