1. <?php
  2. /*
  3. Template Name: Region :: Europe
  4. */
  5. ?>
  6.  
  7. <?php get_header();
  8. $prefix = 'tk_';
  9. ?>
  10.  
  11. <!-- TITLE PAGE -->
  12. <div class="slider-content left">
  13. <div class="wrapper">
  14. <div class="bg-title-page left">
  15. <div class="title-page left"><?php the_title()?></div><!--/title-page-->
  16. </div><!--/bg-title-page-->
  17. </div><!--/wrapper-->
  18. </div><!--/slider-content-->
  19.  
  20.  
  21.  
  22.  
  23.  
  24. <!-- CONTENT -->
  25. <div class="content left">
  26. <div class="wrapper">
  27. <div class="bg-content left">
  28.  
  29. <div class="content-full left">
  30.  
  31.  
  32. <div class="shortcodes left">
  33. <div class="alert info">
  34. <?php
  35. /* Run the loop to output the page.
  36. * If you want to overload this in a child theme then include a file
  37. * called loop-page.php and that will be used instead.
  38. */
  39. //get_template_part( 'loop', 'page' );
  40. wp_reset_query();
  41. if ( have_posts() ) : while ( have_posts() ) : the_post();
  42. the_content();
  43. endwhile;
  44. else:
  45. endif;
  46. wp_reset_query();
  47. ?>
  48. </div>
  49. <br/><br/>
  50.  
  51. <?php
  52. $terms = get_terms("tagportfolio");
  53. $count = count($terms);
  54. echo '<ul id="portfolio-filter">';
  55. echo '<li><a href="#all" title="">All</a></li>';
  56. if ( $count > 0 ){
  57. foreach ( $terms as $term ) {
  58. $termname = strtolower($term->name);
  59. $termname = str_replace(' ', '-', $termname);
  60. echo '<li><a href="#'.$termname.'" title="" rel="'.$termname.'">'.$term->name.'</a></li>';
  61. }
  62. }
  63. echo "</ul>";
  64. ?>
  65. <?php
  66. $loop = new WP_Query(array('post_type' => 'europe', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'asc'));
  67. $count =0;
  68. ?>
  69.  
  70. <div id="portfolio-wrapper">
  71. <ul id="portfolio-list">
  72. <?php if ( $loop ) :
  73. while ( $loop->have_posts() ) : $loop->the_post(); ?>
  74. <?php
  75. $terms = get_the_terms( $post->ID, 'tagportfolio' );
  76. if ( $terms && ! is_wp_error( $terms ) ) :
  77. $links = array();
  78. foreach ( $terms as $term )
  79. {
  80. $links[] = $term->name;
  81. }
  82. $links = str_replace(' ', '-', $links);
  83. $tax = join( " ", $links );
  84. else :
  85. $tax = '';
  86. endif;
  87. ?>
  88. <?php $infos = get_post_custom_values('_url'); ?>
  89. <li class="portfolio-item <?php echo strtolower($tax); ?> all">
  90. <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
  91. foreach((get_the_category()) as $category) {
  92. echo $category->cat_name . ' ';
  93. }
  94. ?> </a></div><hr class="churches">
  95. <h3 class="church"><?php the_title(); ?></h3>
  96. <?php the_content(); ?></br class="clear">
  97. <?php if ($infos) { ?>
  98. <div class="color-buttons color-button-blue website"><a href="http://<?php echo $infos[0]; ?>" target="_blank">Website →</a></div>
  99. <?php } ?>
  100. </li>
  101. <?php endwhile; else: ?>
  102. <li class="error-not-found">Sorry, no portfolio entries for while.</li>
  103. <?php endif; ?>
  104. </ul>
  105. <div class="clearboth"></div>
  106. </div> <!-- end #portfolio-wrapper-->
  107. <script>
  108. jQuery(document).ready(function() {
  109. jQuery("#portfolio-list").filterable();
  110. });
  111. </script>
  112. </div><!-- /shortcodes-right -->
  113.  
  114.  
  115. </div><!--/content-full-->
  116.  
  117.  
  118. </div><!--/bg-content-->
  119.  
  120. <div class="help-content-down left"></div><!--/help-content-down-->
  121.  
  122. </div><!--/wrapper-->
  123. </div><!--/content-->
  124.  
  125. <?php get_footer(); ?>