Guest User

Untitled

a guest
Jun 29th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.89 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. <?php if ( is_home() ) {
  22.     query_posts( array( 'cat' => -11, 'paged' => get_query_var('page') ) );
  23. };
  24. ?>
  25.  
  26.                
  27.  
  28.                 <?php /* Start the Loop */ ?>
  29.                 <?php while ( have_posts()) : the_post(); ?>
  30.  
  31.                     <?php get_template_part( 'content', get_post_format() ); ?>
  32.  
  33.                 <?php endwhile; ?>
  34.  
  35.                 <div class="navigation">
  36.    <!-- REMOVE default page navigation once your custom pagination is working. -->
  37.    <?php //REMOVE DEFAULT:  next_posts_link('&laquo;&laquo; Older Posts')
  38.         //REMOVE DEFAULT:   previous_posts_link('Newer Posts &raquo;&raquo;') ?>
  39.  
  40.    <!-- ADD Custom Numbered Pagination code. -->
  41.    <?php if(function_exists('pagenavi')) { pagenavi(); } ?>
  42.    </div>
  43.  
  44.             <?php else : ?>
  45.  
  46.                 <article id="post-0" class="post no-results not-found">
  47.                     <header class="entry-header">
  48.                         <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  49.                     </header><!-- .entry-header -->
  50.  
  51.                     <div class="entry-content">
  52.                         <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  53.                         <?php get_search_form(); ?>
  54.                     </div><!-- .entry-content -->
  55.                 </article><!-- #post-0 -->
  56.  
  57.             <?php endif; ?>
  58.             </div><!-- #content -->
  59.         </div><!-- #primary -->
  60.  
  61. <?php get_sidebar(); ?>
  62. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment