Skip to content

Instantly share code, notes, and snippets.

@themorgantown
Last active March 7, 2018 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themorgantown/948fe8054e13d3b5608f18f442f70c99 to your computer and use it in GitHub Desktop.
Save themorgantown/948fe8054e13d3b5608f18f442f70c99 to your computer and use it in GitHub Desktop.
Starter Template: Wordpress
<?php /* Template Name: Demo Page Template */ get_header(); ?>
<style>
html {
height:100%;
}
body {
margin:0;
height:100%;
}
</style>
<main role="main">
<!-- section -->
<section>
<h1><?php the_title(); ?></h1>
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php the_content(); ?>
<?php comments_template( '', true ); // Remove if you don't want comments ?>
<br class="clear">
<?php edit_post_link(); ?>
</article>
<!-- /article -->
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h2>Sorry, nothing to display.</h2>
</article>
<!-- /article -->
<?php endif; ?>
</section>
<!-- /section -->
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment