Advertisement
Guest User

index.php

a guest
Mar 18th, 2011
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  1. <?php  get_header(); ?> <!--Call the header.php-->
  2. <?php if (is_single() || is_archive()) {get_sidebar();} ?><!--Call the sidebar if its not a page-->
  3.  
  4.  <div id="content">
  5.  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><!--The print post loop-->
  6.    <?php if (!is_page()) { ?><!--Pages jump over the h2 to the curly brackets -Function- removes titles from pages-->
  7.    <h2> <?php if( !is_singular() ) { ?> <a href="<?php the_permalink() ?>" > <?php } the_title(); if( !is_singular() ) { ?></a> <?php } ?></h2><!-- List post title links-->
  8.    <?php } ?><?php if(is_archive()) { the_excerpt(); } else { the_content(); } ?><!--List the excerpts or full content for posts or pages-->
  9.  <?php endwhile; ?><!--end of the loop-->
  10.     <?php posts_nav_link(' - ','&#171; Prev','Next &#187;') ?> <!--Prev Next post page links-->
  11.     <?php if (is_single()) {comments_template();} ?> <!--Call comments.php if it is a post-->
  12.     <?php else : ?>Nothing Here<?php endif; ?> <!--bad url-->
  13.  </div><!--End content div-->
  14. <?php   get_footer(); ?><!--Call the footer.php-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement