Advertisement
Digitalraindrops

index.php

Sep 4th, 2011
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.22 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The main template file.
  4.  *
  5.  * This is the most generic template file in a WordPress theme
  6.  * and one of the two required files for a theme (the other being style.css).
  7.  * It is used to display a page when nothing more specific matches a query.
  8.  * E.g., it puts together the home page when no home.php file exists.
  9.  * Learn more: http://codex.wordpress.org/Template_Hierarchy
  10.  *
  11.  * @package WordPress
  12.  * @subpackage Twenty_Eleven
  13.  */
  14.  
  15. get_header(); ?>
  16.  
  17.         <div id="primary">
  18.             <div id="content" role="main">
  19.  
  20.             <?php if ( have_posts() ) : ?>
  21.  
  22.                 <?php /* Start wp-pagenavi support */ ?>
  23.                 <?php if(function_exists('wp_pagenavi') ) : ?>
  24.                     <?php wp_pagenavi(); ?>
  25.                 <?php else: ?> 
  26.                     <?php twentyeleven_content_nav( 'nav-above' ); ?>
  27.                 <?php endif; ?>
  28.                 <?php /* End wp-pagenavi support */ ?>
  29.                                
  30.                 <?php /* Start the Loop */ ?>
  31.                 <?php while ( have_posts() ) : the_post(); ?>
  32.                                        
  33.                         <?php
  34.                         /* Include the Post-Format-specific template for the content.
  35.                          * If you want to overload this in a child theme then include a file
  36.                          * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  37.                          */
  38.                         get_template_part( 'content', get_post_format() );
  39.                     ?>
  40.                                        
  41.                 <?php endwhile; ?>
  42.  
  43.                 <?php /* Start wp-pagenavi support */ ?>
  44.                 <?php if(function_exists('wp_pagenavi') ) : ?>
  45.                     <?php wp_pagenavi(); ?>
  46.                 <?php else: ?> 
  47.                     <?php twentyeleven_content_nav( 'nav-below' ); ?>
  48.                 <?php endif; ?>
  49.                 <?php /* End wp-pagenavi support */ ?>
  50.  
  51.  
  52.             <?php else : ?>
  53.  
  54.                 <article id="post-0" class="post no-results not-found">
  55.                     <header class="entry-header">
  56.                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  57.                     </header><!-- .entry-header -->
  58.  
  59.                     <div class="entry-content">
  60.                         <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  61.                         <?php get_search_form(); ?>
  62.                     </div><!-- .entry-content -->
  63.                 </article><!-- #post-0 -->
  64.  
  65.             <?php endif; ?>
  66.  
  67.             </div><!-- #content -->
  68.         </div><!-- #primary -->
  69.  
  70. <?php get_sidebar(); ?>
  71. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement