Advertisement
Guest User

Untitled

a guest
Oct 29th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 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.  
  18.  
  19.  
  20.  
  21. <?php if ( have_posts() ) : ?>
  22.  
  23.  
  24. <?php /* Start the Loop */ ?>
  25.  
  26. <?php if (is_home()) {
  27. query_posts("cat=-5");
  28. } ?>
  29.  
  30. <div id="posts">
  31. <div id="headingbanner"></div>
  32.  
  33. <div id="line-wrap">
  34.  
  35.  
  36.  
  37. <div class="columns-wrapper">
  38. <?php
  39. $count = 0;
  40.  
  41. while(have_posts()) : the_post()
  42. ?>
  43.  
  44. <div class="box<?php if( $count%2 == 0 ) { echo '-1'; }; $count++; ?>">
  45.  
  46. <div class="post-sep"></div>
  47. <a href="<?php the_permalink(); ?>">
  48. <h1><?php the_title(); ?></h1></a> <div class="entry-meta"> </div>
  49. <?php the_post_thumbnail (); ?><?php the_excerpt(); ?>
  50.  
  51. <!--and other output of the loop -->
  52.  
  53. </div>
  54.  
  55. <?php endwhile; ?><?php rewind_posts();?>
  56. </div><!--end columns-wrapper-->
  57.  
  58. <?php rewind_posts(); ?>
  59.  
  60.  
  61. <?php else : ?>
  62.  
  63.  
  64.  
  65. <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
  66.  
  67.  
  68.  
  69. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
  70. <?php get_search_form(); ?>
  71.  
  72.  
  73.  
  74. <?php endif; ?>
  75.  
  76. </div> <div class="clear"></div> <div style="margin: 0 2% 2% 2%; padding: 5%; border-bottom: 1px solid #ccc; border-top: 1px solid #ccc;">
  77.  
  78.  
  79. <div class="navigation"><p><?php posts_nav_link('&#8734;','Go
  80. Forward &nbsp; &rarr; &nbsp;','&nbsp; &larr; &nbsp; Go Back'); ?></p></div> </div></div>
  81.  
  82.  
  83. <?php get_sidebar(); ?>
  84. <?php get_footer(); ?>
  85.  
  86.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement