Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Twenty Seventeen Full Width page template #content #primary {
max-width: 100%;
} #content #primary .entry-header, #content #primary .entry-content {
float: none;
width: 100%;
} #content #primary .entry-header {
margin-bottom: 4em;
* Template Name: Full Width
* Description: A custom template for displaying a fullwidth layout with no sidebar.
* @package Twenty Seventeen Child
get_header(); ?>
<div class="wrap">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/page/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
endwhile; // End of the loop.
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .wrap -->
<?php get_footer();

Hi! How do I add this to the theme?

You can add the code in style.css to your theme's style.css file. Upload the template-full-width.php file to the rest of your theme's directory on your file server. Once you do this you will see "Full Width" as a drop-down option in your page editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment