Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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 echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=260&h=230&src='); ?></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 <= 30 ) {
- //GETS NEXT FOUR EXCERPTS
- ?>
- <?php //MAIN EDIT STARTS HERE
- if( $postcount > 4 && $postcount <= 7 ) {
- //GETS three narrow EXCERPTS, example only
- ?>
- <div class="narrow recent-excerpts <?php echo 'narrow-'.$postcount; ?>">
- <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 }
- else {
- //MAIN EDIT ENDS HERE (there is more edit to close the if/else later)
- ?>
- <div class="clearfloat recent-excerpts">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
- <?php echo get_post_image (get_the_id(), '', '', '' .get_bloginfo('template_url') .'/scripts/timthumb.php?zc=1&w=105&h=85&src='); ?></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 //EDIT TO CLOSE THE IF ELSE FROM MAIN EDIT ?>
- <?php } ?>
- //END OF EDIT
- <?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('Featured Categories','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");
- ?>
- <h5><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?>»</a></h5>
- <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 } ?>
- </div><!--END FEATURED CATS-->
- </div><!--END CONTENT-->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement