Skip to content

Instantly share code, notes, and snippets.

@aphoenix
Last active December 23, 2015 00:29
Show Gist options
  • Save aphoenix/6554053 to your computer and use it in GitHub Desktop.
Save aphoenix/6554053 to your computer and use it in GitHub Desktop.
index.php
<?php get_header(); ?>
<div class="content-wrap">
<hr class="internal-line" />
<?php if(have_posts() ) : ?>
<?php while(have_posts() ) : the_post(); ?>
<div class="home-content-1">
<h1>
<?php if (!is_page()) {
echo '<a href="' . get_permalink() . '" rel="bookmark">';
the_title();
echo '</a>';
} else {
the_title();
}?>
</h1>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="home-content-1">
<h1>Sorry, Page Not Found</h1>
<p>Try using the search form in the top right, or browsing back to <a href="<?php bloginfo('url'); ?>">our homepage</a> to find what you were looking for.</p>
</div>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment