Skip to content

Instantly share code, notes, and snippets.

@chetan
Created September 9, 2013 22:02
Show Gist options
  • Save chetan/6502133 to your computer and use it in GitHub Desktop.
Save chetan/6502133 to your computer and use it in GitHub Desktop.
wordpress template index.php
<?php require_once("_setup.php"); ?>
<div class="container">
<?php require_once("_header.php"); ?>
<div class="page">
<div class="row">
<div class="content col-md-8">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="hentry" id="article-<?php the_ID(); ?>">
<h2 class="entry-title">
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
<?php the_comment_count_elem(); ?>
</h2>
<div class="posted">
Posted
<abbr class="published" title="<?php the_time_xml() ?>"><span class="posted_date" title="<?php the_time('D, d M Y H:i:s T') ?>"><?php the_time('F d, Y') ?></span></abbr>
</div>
<br class="clear" />
<div class="entry-content">
<?php the_content('Continue reading...'); ?>
</div>
<hr class="post"/>
</div> <!-- hentry -->
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
</div>
<?php else : // ! have_posts() ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div> <!-- content -->
<div class="col-md-2">
<?php get_sidebar(); ?>
</div>
</div> <!-- row -->
</div> <!-- page -->
</div> <!-- container -->
<?php require_once("_footer.php"); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment