full width page?
-
I am not really going to use the blog, does this theme come with an option for a full width page?
-
If you don’t keep any widgets on both the sidebar then this theme will automatically adopt full width style.
okay… but I can’t have it in one page and not another.
You mean you want sidebar only in some pages. And you want some pages to be full width?
If so, it’s easy.
You just need to paste a code, which I’ll send you tomorrow. And thank you for notifying about this. I’ll add option for a full width page in the next update. 🙂
That’s awesome thanks so much!
Just a reminder awaiting that code?
🙂SuzyB,
You need to create a new file in Willingness theme folder via FTP. Name it page_fullwidth.php
Keep the following code on page_fullwidth.php
<?php /** * Template Name: Full Width Template * * @package willingness */ get_header(); ?> <style type="text/css"> #content { width: 100%; padding: 0; } .no-right .site-content { margin: 0 0 0 0; } .no-left .site-content { margin: 0 0 0 0; } .no-left .no-right .site-content{ margin: 0 0 0 0; } .site-content{ margin: 0; } #secondary{ display: none; } #right-sidebar{ display: none; } </style> <div id="primary" class="content-area"> <div id="content" class="site-content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php // If comments are open or we have at least one comment, load up the comment template if ( comments_open() || '0' != get_comments_number() ) comments_template(); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> <?php get_sidebar(); ?> <?php get_footer(); ?>After that, go to your page, and in the Page Attributes section select Full Width Template
Thank you.
this is great – only one thing more. The text is up against the edge of the content body, I need it set in with a margin of like 20px?
thanksTry adding the following code in between
<style type="text/css">and</style>on the above code:.hentry { margin: 2em; }You can increase or decrease that
margin: 2em;according to your need.Any chance you could send me link to the website you’re trying to make this work on?
It would be easy to send you codes.Thanks, that works nicely!
The topic ‘full width page?’ is closed to new replies.
