forked from xwolfde/Piratenkleider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
172 lines (149 loc) · 6.24 KB
/
home.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php get_header();
$options = get_option( 'piratenkleider_theme_options' );
if (!isset($options['slider-aktiv']))
$options['slider-aktiv'] = $defaultoptions['slider-aktiv'];
if ( $options['slider-aktiv'] == "1" ){ ?>
<div class="section teaser">
<div class="row">
<?php get_sidebar( 'teaser' ); ?>
</div>
</div>
<?php } ?>
<div class="section content" id="main-content">
<div class="row">
<div class="content-primary">
<div class="skin">
<h1 class="skip"><?php _e("Aktuelle Artikel", 'piratenkleider'); ?></h1>
<?php
$i = 0;
$col = 0;
if (!isset($options['num-article-startpage-fullwidth']))
$options['num-article-startpage-fullwidth'] = $defaultoptions['num-article-startpage-fullwidth'];
if (!isset($options['num-article-startpage-halfwidth']))
$options['num-article-startpage-halfwidth'] = $defaultoptions['num-article-startpage-halfwidth'];
$numentries = $options['num-article-startpage-fullwidth'] + $options['num-article-startpage-halfwidth'];
$col_count = 3;
$cols = array();
while (have_posts() && $i<$numentries) : the_post();
$i++;
ob_start();
?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>" >
<div class="post-title">
<h2>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h2>
</div>
<div class="post-info">
<div class="commentbubble">
<?php comments_popup_link( '0<span class="skip"> Kommentare</span>', '1<span class="skip"> Kommentar</span>', '%<span class="skip"> Kommentare</span>', 'comments-link', '');?>
</div>
<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 echo get_piratenkleider_custom_excerpt(); ?>
</div>
</div>
<?php
$output = ob_get_contents();
ob_end_clean();
$cols[$col++] .= $output;
endwhile;
?>
<div class="columns">
<?php
$z=1;
foreach($cols as $key => $col) {
if (( isset($options['num-article-startpage-fullwidth']))
&& ($options['num-article-startpage-fullwidth']>$key )) {
echo '<div class="column0">' . $col . '<hr></div>';
} else {
echo '<div class="column'.$z.'">' . $col . '</div>';
$z++;
if ($z>2) {
$z=1;
echo '<hr style="clear: both;">';
}
}
}
?>
</div>
<?php if ( ! have_posts() ) : ?>
<h2><?php _e("Nichts gefunden", 'piratenkleider'); ?></h2>
<p>
<?php _e("Es konnten keine Artikel gefunden werden.
Bitte versuchen Sie es nochmal mit einer
Suche.", 'piratenkleider'); ?>
</p>
<?php get_search_form(); ?>
<hr>
<?php endif; ?>
<div class="startpage-widget-area">
<h2 class="skip"><?php _e("Weitere Artikel", 'piratenkleider'); ?></h2>
<div class="first-startpage-widget-area">
<div class="skin">
<?php if ( is_active_sidebar( 'first-startpage-widget-area' ) ) { ?>
<?php dynamic_sidebar( 'first-startpage-widget-area' ); ?>
<?php } else { ?>
<div class="widget">
<ul>
<?php
$postslist = get_posts("numberposts=5&order=DESC&offset=$numentries");
if (isset($postslist)) { ?>
<h3><?php _e("Ältere Artikel", 'piratenkleider'); ?></h3>
<?php
}
foreach ($postslist as $post) : setup_postdata($post);
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<span class="date"><?php the_time('d.m.Y') ?></span></li>
<?php endforeach; ?>
</ul>
</div>
<div class="widget">
<h3><?php _e("Kategorien", 'piratenkleider'); ?></h3>
<ul>
<?php wp_list_categories('title_li='); ?>
</ul>
</div>
<?php } ?>
</div>
</div>
<div class="second-startpage-widget-area">
<div class="skin">
<?php if ( is_active_sidebar( 'second-startpage-widget-area' ) ) { ?>
<?php dynamic_sidebar( 'second-startpage-widget-area' ); ?>
<?php } else { ?>
<div class="widget">
<?php $tags = get_tags();
if (isset($tags)) { ?>
<h3><?php _e("Schlagworte", 'piratenkleider'); ?></h3>
<?php
}
?>
<div class="tagcloud">
<?php wp_tag_cloud(array('smallest' => 14, 'largest' => 28)); ?>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<div class="content-aside">
<div class="skin">
<h1 class="skip"><?php _e( 'Weitere Informationen', 'piratenkleider' ); ?></h1>
<?php get_sidebar(); ?>
</div>
</div>
</div>
<?php get_piratenkleider_socialmediaicons($options['alle-socialmediabuttons']); ?>
</div>
<?php get_footer(); ?>