WordPress Full Width Post Template Twentyseventeen-Child

How to create a wide Post template for the Twenty Seventeen theme.

This post assumes you are using a Twenty Seventeen Child Theme.

Step 1

Copy single.php from the twentyseventeen folder into your twentyseventeen-child theme folder as a new file named single-wide.php.

cp /var/www/itsmetommy.com/public_html/wp-content/themes/twentyseventeen/single.php /var/www/itsmetommy.com/public_html/wp-content/themes/twentyseventeen-child/single-wide.php

Step 2

Edit single-wide.php within your child theme folder.

Add the following at the top of the page – remove all other lines between /** and */.

/*
 * Template Name: Wide Template
 * Template Post Type: post, page, product
 */

Change the class from primary to primary-wide.

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

And delete the following line.

<?php get_sidebar(); ?>

Step 3

Add the following to style.css within your child theme folder.

.primary-wide {
 float: left;
 width: 100%;
}

You will now have the option to choose Wide Template within WordPress Posts.