forked from RRZE-Webteam/Design-RRZE-Techfak2013
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
69 lines (61 loc) · 2.25 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
<?php
get_header();
global $options;
if (is_active_sidebar('inhaltsinfo-area')) {
dynamic_sidebar('inhaltsinfo-area');
}
$i = 0;
$col = 0;
$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();
if (( isset($options['num-article-startpage-fullwidth'])) && ($options['num-article-startpage-fullwidth'] >= $i )) {
tf2013_post_teaser($options['teaser-titleup'], $options['teaser-datebox'], $options['teaser-dateline'], $options['teaser_maxlength'], $options['teaser-thumbnail_fallback'], $options['teaser-floating']);
} else {
tf2013_post_teaser($options['teaser-titleup-halfwidth'], $options['teaser-datebox-halfwidth'], $options['teaser-dateline-halfwidth'], $options['teaser-maxlength-halfwidth'], $options['teaser-thumbnail_fallback'], $options['teaser-floating-halfwidth']);
}
$output = ob_get_contents();
ob_end_clean();
if (isset($output)) {
$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 $col;
} else {
if (( isset($options['num-article-startpage-fullwidth'])) && ($options['num-article-startpage-fullwidth'] == $key ) && ($options['num-article-startpage-fullwidth'] > 0 )) {
echo '<hr class="trenner">';
}
echo '<div class="column' . $z . '">' . $col . '</div>';
$z++;
if ($z > 2) {
$z = 1;
echo '<hr class="trenner">';
}
}
}
?>
</div>
<?php if ($wp_query->max_num_pages > 1) : ?>
<div class="post-nav"><ul>
<li class="back"><?php next_posts_link(__('← Ältere Beiträge', 'tf2013')); ?></li>
<li class="forward"><?php previous_posts_link(__('Neuere Beiträge →', 'tf2013')); ?></li>
</ul></div>
<?php endif; ?>
<?php if (!have_posts()) : ?>
<h2><?php _e("Nichts gefunden", 'tf2013'); ?></h2>
<p>
<?php _e("Es konnten keine Artikel gefunden werden. Bitte versuchen Sie es nochmal mit einer Suche.", 'tf2013'); ?>
</p>
<?php get_search_form(); ?>
<hr>
<?php endif; ?>
<?php get_footer(); ?>