Skip to content

Instantly share code, notes, and snippets.

@faddah
Created August 17, 2016 19:26
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 faddah/72cc89f4364531d14cc562bb6db60c98 to your computer and use it in GitHub Desktop.
Save faddah/72cc89f4364531d14cc562bb6db60c98 to your computer and use it in GitHub Desktop.
my page-sidebar-left.php file from zac gordon's treehouse course on wordpress theme development
<?php
/*
Template Name: Left Sidebar
*/
<section class="two-column row no-max pad">
<div class="small-12 columns">
<div class="row">
<!-- Primary Column -->
<div class="small-12 medium-7 medium-offset-1 medium-push-4 columns">
<div class="primary">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<hr>
<p><?php the_content(); ?></p>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no pages found — like, at all.' ); ?></p>
<?php endif; ?>
</div>
</div>
<!-- Secondary Column -->
<div class="small-12 medium-4 medium-pull-8 columns">
<div class="secondary">
<h2 class="module-heading">The Sidebar</h2>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment