Skip to content

Instantly share code, notes, and snippets.

@joetower
Last active October 14, 2016 16:01
Show Gist options
  • Save joetower/17f46113794e5ceb2a6301612eebe408 to your computer and use it in GitHub Desktop.
Save joetower/17f46113794e5ceb2a6301612eebe408 to your computer and use it in GitHub Desktop.

Revisions

  1. joetower revised this gist Oct 14, 2016. 1 changed file with 19 additions and 18 deletions.
    37 changes: 19 additions & 18 deletions page-flexible.php
    Original file line number Diff line number Diff line change
    @@ -6,30 +6,31 @@

    get_header(); ?>

    <div id="primary" class="content-area">
    <div id="primary" class="content-area">

    <?php get_sidebar( 'content-top' ); ?>
    <?php get_sidebar( 'content-top' ); ?>

    <main id="main" class="site-main" role="main">
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();
    <main id="main" class="site-main" role="main">

    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }
    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );

    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->
    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }

    <?php get_sidebar( 'content-bottom' ); ?>
    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->

    </div><!-- .content-area -->
    <?php get_sidebar( 'content-bottom' ); ?>

    </div><!-- .content-area -->

    <?php get_footer(); ?>
  2. joetower revised this gist Oct 14, 2016. No changes.
  3. joetower revised this gist Oct 14, 2016. No changes.
  4. joetower revised this gist Oct 14, 2016. 1 changed file with 18 additions and 18 deletions.
    36 changes: 18 additions & 18 deletions page-flexible.php
    Original file line number Diff line number Diff line change
    @@ -6,30 +6,30 @@

    get_header(); ?>

    <div id="primary" class="content-area">
    <div id="primary" class="content-area">

    <?php get_sidebar( 'content-top' ); ?>
    <?php get_sidebar( 'content-top' ); ?>

    <main id="main" class="site-main" role="main">
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();
    <main id="main" class="site-main" role="main">
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );
    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }
    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }

    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->
    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->

    <?php get_sidebar( 'content-bottom' ); ?>
    <?php get_sidebar( 'content-bottom' ); ?>

    </div><!-- .content-area -->
    </div><!-- .content-area -->

    <?php get_footer(); ?>
  5. joetower revised this gist Oct 14, 2016. No changes.
  6. joetower revised this gist Oct 14, 2016. 1 changed file with 17 additions and 18 deletions.
    35 changes: 17 additions & 18 deletions page-flexible.php
    Original file line number Diff line number Diff line change
    @@ -10,24 +10,23 @@

    <?php get_sidebar( 'content-top' ); ?>

    <main id="main" class="site-main" role="main">

    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }

    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->
    <main id="main" class="site-main" role="main">
    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }

    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->

    <?php get_sidebar( 'content-bottom' ); ?>

  7. joetower revised this gist Oct 14, 2016. No changes.
  8. joetower created this gist Oct 14, 2016.
    36 changes: 36 additions & 0 deletions page-flexible.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    <?php
    /**
    * Template Name: Flexible Page Template
    * // This template uses ACF and full-width featured image
    */

    get_header(); ?>

    <div id="primary" class="content-area">

    <?php get_sidebar( 'content-top' ); ?>

    <main id="main" class="site-main" role="main">

    <?php
    // Start the loop.
    while ( have_posts() ) : the_post();

    // Include the page content template.
    get_template_part( 'template-parts/content', 'page-full' );

    // If comments are open or we have at least one comment, load up the comment template.
    if ( comments_open() || get_comments_number() ) {
    comments_template();
    }

    // End of the loop.
    endwhile;
    ?>
    </main><!-- .site-main -->

    <?php get_sidebar( 'content-bottom' ); ?>

    </div><!-- .content-area -->

    <?php get_footer(); ?>