Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The loop that displays just titles.
- *
- * @package WordPress
- * @subpackage Twenty_Ten
- * @since Twenty Ten 1.0
- */
- ?>
- <?php /* Display navigation to next/previous pages when applicable */ ?>
- <?php if ( $wp_query->max_num_pages > 1 ) : ?>
- <?php /* add page navigation to indexes */ ?>
- <?php if(function_exists('wp_pagenavi') ) : ?>
- <?php wp_pagenavi(); ?>
- <?php else: ?>
- <div id="nav-above" class="navigation">
- <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
- <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
- </div>
- <?php endif; ?>
- <?php endif; ?>
- <?php /* If there are no posts to display, such as an empty archive page */ ?>
- <?php if ( ! have_posts() ) : ?>
- <div id="post-0" class="post error404 not-found">
- <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </div><!-- #post-0 -->
- <?php endif; ?>
- <?php /* Start the Loop inside the list box. */ ?>
- <div class="list-box">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php $counter++; $style=""; ?>
- <?php if($counter % 2) $style='style="background-color: #f5f5f5";'; ?>
- <?php /* Display post list of titles */ ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php echo $style; ?> >
- <h2 class="list-title">
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </div><!-- #post-## -->
- <?php endwhile; // End the loop. Whew. ?>
- </div>
- <?php /* Display navigation to next/previous pages when applicable */ ?>
- <?php if ( $wp_query->max_num_pages > 1 ) : ?>
- <?php /* add page navigation to indexes */ ?>
- <?php if(function_exists('wp_pagenavi') ) : ?>
- <?php wp_pagenavi(); ?>
- <?php else: ?>
- <div id="nav-below" class="navigation">
- <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
- <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
- </div><!-- #nav-below -->
- <?php endif; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment