single.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?php get_header();
  2. $options = get_option( 'piratenkleider_theme_options' );
  3. ?>
  4. <div class="section content" id="main-content">
  5. <div class="row">
  6. <div class="content-primary">
  7. <div class="skin">
  8. <?php if ( have_posts() ) while ( have_posts() ) : the_post();
  9. $custom_fields = get_post_custom();
  10. ?>
  11. <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  12. <div class="post-title">
  13. <h1><?php the_title(); ?></h1>
  14. </div>
  15. <?php
  16. if ( (isset($custom_fields['show-post-disclaimer']))
  17. && ($custom_fields['show-post-disclaimer'][0]<>'')
  18. && ($options['post_disclaimer']<>'')
  19. && ( ($custom_fields['show-post-disclaimer'][0]==1) || ($custom_fields['show-post-disclaimer'][0]==3))
  20. ) {
  21. echo '<div class="disclaimer">';
  22. echo $options['post_disclaimer'];
  23. echo '</div>';
  24. }
  25. ?>
  26. <div class="post-info">
  27. <?php
  28. $num_comments = get_comments_number();
  29. if (!isset($options['zeige_commentbubble_null']))
  30. $options['zeige_commentbubble_null'] = $defaultoptions['zeige_commentbubble_null'];
  31. if (($num_comments>0) || ( $options['zeige_commentbubble_null'])) { ?>
  32. <div class="commentbubble">
  33. <?php
  34. if ($num_comments>0) {
  35. comments_popup_link( '0<span class="skip"> Kommentar</span>', '1<span class="skip"> Kommentar</span>', '%<span class="skip"> Kommentare</span>', 'comments-link', '%<span class="skip"> Kommentare</span>');
  36. } else {
  37. // Wenn der Zeitraum abgelaufen ist UND keine Kommentare gegeben waren, dann
  38. // liefert die Funktion keinen Link, sondern nur den Text . Daher dieser
  39. // Woraround:
  40. $link = get_comments_link();
  41. echo '<a href="'.$link.'">0<span class="skip"> Kommentar</span></a>';
  42. }
  43. ?>
  44. </div>
  45. <?php } ?>
  46. <div class="cal-icon">
  47. <span class="day"><?php the_time('j.'); ?></span>
  48. <span class="month"><?php the_time('m.'); ?></span>
  49. <span class="year"><?php the_time('Y'); ?></span>
  50. </div>
  51. </div>
  52. <div class="post-entry">
  53. <?php the_content(); ?>
  54. </div>
  55. <?php
  56. if ( (isset($custom_fields['show-post-disclaimer']))
  57. && ($custom_fields['show-post-disclaimer'][0]<>'')
  58. && ($options['post_disclaimer']<>'')
  59. && ( ($custom_fields['show-post-disclaimer'][0]==2) || ($custom_fields['show-post-disclaimer'][0]==3))
  60. ) {
  61. echo '<div class="disclaimer">';
  62. echo $options['post_disclaimer'];
  63. echo '</div>';
  64. }
  65. ?>
  66. <div class="post-meta">
  67. <div>
  68. <?php
  69. piratenkleider_post_pubdateinfo();
  70. if ($options['aktiv-autoren']) piratenkleider_post_autorinfo();
  71. piratenkleider_post_taxonominfo();
  72. ?>
  73. </div>
  74. <div><?php edit_post_link( __( 'Bearbeiten', 'piratenkleider' ), '', '' ); ?></div>
  75. </div>
  76. </div>
  77. <hr>
  78. <div class="post-comments" id="comments">
  79. <?php comments_template( '', true ); ?>
  80. </div>
  81. <div class="post-nav">
  82. <ul>
  83. <?php previous_post_link('<li class="back">%link</li>', '%title', $in_same_cat = false, $excluded_categories = ''); ?>
  84. <?php next_post_link('<li class="forward">%link</li>', '%title', $in_same_cat = false, $excluded_categories = ''); ?>
  85. </ul>
  86. <?php if (has_filter( 'related_posts_by_category')) { ?>
  87. <h3><?php _e("Weitere Artikel in diesem Themenkreis:", 'piratenkleider'); ?></h3>
  88. <ul class="related">
  89. <?php do_action(
  90. 'related_posts_by_category',
  91. array(
  92. 'orderby' => 'post_date',
  93. 'order' => 'DESC',
  94. 'limit' => 5,
  95. 'echo' => true,
  96. 'before' => '<li>',
  97. 'inside' => '',
  98. 'outside' => '',
  99. 'after' => '</li>',
  100. 'rel' => 'follow',
  101. 'type' => 'post',
  102. 'image' => array(1, 1),
  103. 'message' => 'Keine Treffer'
  104. )
  105. ) ?>
  106. </ul>
  107. <?php } ?>
  108. </div>
  109. <?php endwhile; // end of the loop. ?>
  110. </div>
  111. </div>
  112. <div class="content-aside">
  113. <div class="skin">
  114. <h1 class="skip"><?php _e( 'Weitere Informationen', 'piratenkleider' ); ?></h1>
  115. <?php
  116. if ((($custom_fields['image_url'][0]<>'') && ($custom_fields['text'][0]<>''))
  117. || (($custom_fields['text'][0]<>'') && (has_post_thumbnail())))
  118. { ?>
  119. <div id="steckbrief">
  120. <?php
  121. if ($custom_fields['image_url'][0]<>'') {
  122. echo wp_get_attachment_image( $custom_fields['image_url'][0], array(300,300) );
  123. } else {
  124. the_post_thumbnail(array(300,300));
  125. } ?>
  126. <div class="text">
  127. <?php echo do_shortcode(get_post_meta($post->ID, 'text', $single = true)); ?>
  128. </div>
  129. </div>
  130. <?php
  131. }
  132. piratenkleider_echo_player();
  133. get_sidebar();
  134. ?>
  135. </div>
  136. </div>
  137. </div>
  138. <?php get_piratenkleider_socialmediaicons(2); ?>
  139. </div>
  140. <?php get_footer(); ?>