This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
105 lines (78 loc) · 2.97 KB
/
index.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
<?php get_header(); ?>
<?php if (have_posts()) { ?>
<div id="content">
<?php
$postCount = 0;
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts( 'paged=$page&post_per_page=-1&cat=' . get_query_var('cat') );
while (have_posts()) { the_post();
if( $postcount == 0 ) {
//GETS LATEST OR STICKY POST
?>
<div id="lead" class="clearfloat">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail('featured'); } ?></a>
<div id="lead-text">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?></a> <span class="commentcount"> (<?php comments_popup_link('0', '1', '%'); ?>)</span></h2>
<p class="date"><?php the_time('n/d/y'); ?> • </p>
<?php the_excerpt(); ?>
</div>
</div><!--END LEAD/STICKY POST-->
<div id="more-posts">
<h3><?php _e('Recent Posts','Mimbo'); ?></h3>
<?php
}
elseif( $postcount > 0 && $postcount <= 4 ) {
//GETS NEXT FOUR EXCERPTS
?>
<div class="clearfloat recent-excerpts">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?></a>
<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> <span class="commentcount">(<?php comments_popup_link('0', '1', '%'); ?>)</span></h4>
<p class="date"><?php the_time('n/d/y'); ?> • </p>
<?php the_excerpt(); ?>
</div>
<?php //GETS NEXT HEADLINES
}
else {
ob_start();
echo '<li><a href="';
the_permalink();
echo '">';
the_title();
echo '</a></li>';
$links[] = ob_get_contents();
ob_end_clean();
}
$postcount ++;
}
}
else {
?>
<?php } ?>
<?php
if(count($links)): ?>
<h3><?php _e('Older Posts','Mimbo'); ?></h3>
<ul class="headlines"><?php echo join("\n", $links); ?></ul>
<?php endif; ?>
</div><!--END RECENT/OLDER POSTS-->
<div id="featured-cats">
<h3><?php _e('News','Mimbo'); ?></h3>
<?php
$display_categories = get_option('openbook_cats');
foreach ($display_categories as $category) {
$showposts = get_option('openbook_featured_posts');
query_posts("showposts=$showposts&cat=$category");
?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li class="clearfloat"><p class="date"><?php the_time('n/d/y'); ?> • </p><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php } ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Left Sidebar') ) : ?><?php endif; ?>
</div><!--END FEATURED CATS-->
</div><!--END CONTENT-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>