Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <?php $page = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; ?>
- <?php $offset = ( $page - 1 ) * 9 + 1; ?>
- <div id="content">
- <div id="featured">
- <!-- If home page, show featured image, if not... don't show anything -->
- <?php if(! $paged || $paged < 2) : ?>
- <?php if (have_posts()) : ?>
- <?php query_posts('showposts=1'); while (have_posts()) : the_post(); ?>
- <a href="<?php the_permalink() ?>" title="<?php echo get_the_excerpt(); ?>"><?php the_post_thumbnail('featured-image'); ?></a>
- <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
- <div class="featured-cat"><?php the_category(', ') ?></div>
- <div class="featured-info">
- <?php $myExcerpt = get_the_excerpt(); $tags = array("<p>", "</p>"); $myExcerpt = str_replace($tags, "", $myExcerpt); echo $myExcerpt; ?>
- <a href="<?php the_permalink() ?>">Continue Reading</a>
- </div><!-- /.featured-info -->
- <?php endwhile;?>
- <?php wp_reset_query(); ?>
- <?php endif; ?>
- <?php endif; ?>
- </div><!-- /#featured -->
- <div id="posts">
- <!-- If home page show 9 thumbs with an offset of 1, 10, 19, 28, 37, etc -->
- <?php if (have_posts()) : ?>
- <?php query_posts('posts_per_page=9&paged='.$paged.'&offset='.$offset); while ( have_posts() ) : the_post(); ?>
- <?php include("incl/post.php"); ?>
- <?php endwhile;?>
- <?php wp_reset_query(); ?>
- <?php endif; ?>
- <!-- If other, be normal, there is a known bug here -->
- <div id="browsing">
- <div class="browse-nav">
- <div class="browse-left"><?php previous_posts_link('previous') ?> </div><!-- /.browse-left -->
- <div class="browse-mid"><div class="navigation"><?php if(function_exists('pagenavi')) { pagenavi(); } ?></div></div><!-- /.browse-mid -->
- <div class="browse-right"><?php next_posts_link('next') ?> </div><!-- /.browse-right -->
- </div><!-- /.browse-nav -->
- <div class="clear"></div>
- </div><!-- /#browsing -->
- </div><!-- /#posts -->
- </div><!-- /#content -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement