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