body.page-template-template-full-width #content #primary { | |
max-width: 100%; | |
} | |
body.page-template-template-full-width #content #primary .entry-header, | |
body.page-template-template-full-width #content #primary .entry-content { | |
float: none; | |
width: 100%; | |
} | |
body.page-template-template-full-width #content #primary .entry-header { | |
margin-bottom: 4em; | |
} |
<?php | |
/** | |
* 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"> | |
<?php | |
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() ) : | |
comments_template(); | |
endif; | |
endwhile; // End of the loop. | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
</div><!-- .wrap --> | |
<?php get_footer(); |
This comment has been minimized.
This comment has been minimized.
Hey! |
This comment has been minimized.
This comment has been minimized.
You are a rock star, my friend. Thank you! |
This comment has been minimized.
This comment has been minimized.
Works like a charm. To be more precise, below are two things you need to do: |
This comment has been minimized.
This comment has been minimized.
Thanks! Would there be any other easy way to add the standard post template format (column + side bar on the right) to pages, as well? I've been trying but this is still a bit beyond me. Edit: Never mind. Found the solution here: https://www.cssigniter.com/add-custom-page-template-using-child-theme/ |
This comment has been minimized.
This comment has been minimized.
Great, thanks! |
This comment has been minimized.
This comment has been minimized.
I tried as told here https://themecoder.de/2017/04/12/full-width-page-template-fuer-twenty-seventeen-mit-wordpress-child-theme-erstellen/ |
This comment has been minimized.
Hi! How do I add this to the theme?