tag.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php get_header();
  2. global $options;
  3. global $wp_query;
  4. $cat_obj = $wp_query->get_queried_object();
  5. $thisCat = $cat_obj->term_id;
  6. $thisCatName = get_cat_name($thisCat);
  7. ?>
  8. <div class="section content" id="main-content">
  9. <div class="row">
  10. <div class="content-primary">
  11. <?php
  12. $image_url = '';
  13. $attribs = array( "credits" => $options['img-meta-credits'] );
  14. if (($options['aktiv-platzhalterbilder-indexseiten']==1) && (isset($options['src-default-symbolbild-tag']))) {
  15. if (isset($options['src-default-symbolbild-tag_id']) && ($options['src-default-symbolbild-tag_id']>0)) {
  16. $image_url_data = wp_get_attachment_image_src( $options['src-default-symbolbild-tag_id'], 'full');
  17. $image_url = $image_url_data[0];
  18. $attribs = piratenkleider_get_image_attributs($options['src-default-symbolbild-tag_id']);
  19. } else {
  20. $image_url = $options['src-default-symbolbild-tag'];
  21. }
  22. }
  23. if (isset($image_url) && (strlen($image_url)>4)) {
  24. if ($options['indexseitenbild-size']==1) {
  25. echo '<div class="content-header-big">';
  26. } else {
  27. echo '<div class="content-header">';
  28. }
  29. ?>
  30. <h1 class="post-title"><span><?php printf( __( 'Tag %s', 'piratenkleider' ), '' . single_cat_title( '', false ) . '' ); ?></span></h1>
  31. <div class="symbolbild"><img src="<?php echo $image_url ?>" alt="" itemprop="image">
  32. <?php if (isset($attribs["credits"]) && (strlen($attribs["credits"])>1)) {
  33. echo '<div class="caption">'.$attribs["credits"].'</div>';
  34. } ?>
  35. </div>
  36. </div>
  37. <?php } ?>
  38. <div class="skin" itemprop="mainContentOfPage">
  39. <?php if (!(isset($image_url) && (strlen($image_url)>4))) { ?>
  40. <h1 class="post-title"><span itemprop="name"><?php printf( __( 'Tag %s', 'piratenkleider' ), '' . single_cat_title( '', false ) . '' ); ?></span></h1>
  41. <?php }
  42. $i = 0;
  43. $col = 0;
  44. $numentries = $options['category-num-article-fullwidth'] + $options['category-num-article-halfwidth'];
  45. $cols = array();
  46. global $query_string;
  47. $args = $query_string;
  48. $args .= '&posts_per_page='.$numentries;
  49. query_posts( $args );
  50. while (have_posts() && $i<$numentries) : the_post();
  51. $i++;
  52. $output = '';
  53. if (( isset($options['category-num-article-fullwidth']))
  54. && ($options['category-num-article-fullwidth']>=$i )) {
  55. $output = piratenkleider_post_teaser($options['category-teaser-titleup'],$options['category-teaser-datebox'],$options['category-teaser-dateline'],$options['category-teaser-maxlength'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating']);
  56. } else {
  57. $output = piratenkleider_post_teaser($options['category-teaser-titleup-halfwidth'],$options['category-teaser-datebox-halfwidth'],$options['category-teaser-dateline-halfwidth'],$options['category-teaser-maxlength-halfwidth'],$options['teaser-thumbnail_fallback'],$options['category-teaser-floating-halfwidth']);
  58. }
  59. if (isset($output)) {
  60. $cols[$col++] = $output;
  61. }
  62. endwhile;
  63. ?>
  64. <div class="columns">
  65. <?php
  66. $z=1;
  67. foreach($cols as $key => $col) {
  68. if (( isset($options['category-num-article-fullwidth']))
  69. && ($options['category-num-article-fullwidth']>$key )) {
  70. echo $col;
  71. } else {
  72. if (( isset($options['category-num-article-fullwidth']))
  73. && ($options['category-num-article-fullwidth']==$key )
  74. && ($options['category-num-article-fullwidth']>0) ) {
  75. echo '<hr>';
  76. }
  77. echo '<div class="column'.$z.'">' . $col . '</div>';
  78. $z++;
  79. if ($z>2) {
  80. $z=1;
  81. echo '<hr style="clear: both;">';
  82. }
  83. }
  84. }
  85. ?>
  86. </div>
  87. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  88. <div class="archiv-nav"><p>
  89. <?php next_posts_link( __( '&larr; Older Entries', 'piratenkleider' ) ); ?>
  90. <?php previous_posts_link( __( 'Newer Entries &rarr;', 'piratenkleider' ) ); ?>
  91. </p></div>
  92. <?php endif;
  93. if ( is_active_sidebar( 'indexpages-widget-area' ) ) {
  94. dynamic_sidebar( 'indexpages-widget-area' );
  95. } ?>
  96. </div>
  97. </div>
  98. <div class="content-aside">
  99. <div class="skin">
  100. <h1 class="skip"><?php _e( 'More information', 'piratenkleider' ); ?></h1>
  101. <?php get_sidebar(); ?>
  102. </div>
  103. </div>
  104. </div>
  105. <?php get_piratenkleider_socialmediaicons(2); ?>
  106. </div>
  107. <?php get_footer(); ?>