Make a Full Width Page For Your WordPress Theme

A Full Width Page is one that has no sidebars and all the width of the page is just content. Such a page has many applications. You might not wish to show sidebars on your contact page for instance. Well, lets see some better applications of Full-Width Pages.

Full Width Page in WordPress

Making a Sales Page – Traditional sales pages don’t have sidebars (haven’t you seen those pages with lots of customer feedback and that pages where you have to scroll miles and miles to see the end?). Removing Sidebar makes it look better.

Search Result Pages for Google Custom Search Engine – If you choose to display results of Google CSE on your own pages; the script they give you can insert ads on the right of the searches just as we see on Google. A full width page can make way for the ads.

Enough, lets do it.

Going Full Width on any WordPress Theme

As an example, I will use this Theme – This Just In!. It’s a simple and elegant Free Theme and comes with an image gallery just below the header.

Step 1 – Make a Page Template

Pages in WordPress are defined by page.php in the theme. Make a copy of page.php and rename it as fullwidth.php. It doesn’t matter what you name it, it can be yourname.php instead.

Now add the following to the start of the code in fullwidth.php :

<?php
/*
Template Name: Full Width
*/
?>

Save and lo! we just defined a custom page template.

Step 2 – Rip Off the Sidebars

Sidebars are included in the page template using this :

<?php get_sidebar(); ?>

Delete it from fullwidth.php. In most themes it should be towards the end of the code. Sidebars are gone.

Step 3 – Define a Full Width Style

Open up style.css and find where the style of the content area is defined. Usually its called #content. In our example theme, the style is defined as:

#content
{
margin: 5px 35px 0;
font-size: 1.2em;
width: 575px;
float: left;
display: inline;
}

You can see that in line three the width of the content area is defined as 575 px. Copy paste all the above said code and define a new ID #contentwide as:

#contentwide
{
margin: 5px 35px 0;
font-size: 1.2em;
width: 850px;
float: left;
display: inline;
}

The only change being the width in line three as 850px. The value 850 px was found by trial and error.

Step  4 – Add the style to the Page

If you try making a full width page after step 3, you will get a page with no sidebar, but the sidebar area is blank. Why? The page still uses the style in the content ID. Open up fullwidth.php again and change the id content to contentwide in the code.

<div id="contentwide">

That’s it, upload fullwidth.php and style.css to the theme folder.

How to Actually Create a Full Width Page?

Open a New Page Editor. Write in some content. From the right sidebar of the page editor, from the section called Attributes, select Template as Full Width.

Select Full Width Template in Editor

Publish the page. Congrats!

If you have any queries or if I missed anything, use the comments. Hope you enjoyed it and found it useful. What are you using that full width page for?

P.S: If you need help with your theme to make a full width page, contact me with your details.

KishPress : Professional WordPress Tools

You May Also Like To Read:

  1. How to Identify the Theme on any WordPress Blog
  2. How To Make Your Theme WordPress 3.0 Compatible
  3. Make Yourself a Unique WordPress Theme in 5 Easy Steps
  4. Fix For BuddyPress Activity Stream Not Showing Up on HomePage
  5. How to Change Permalinks of a WordPress Page without Losing Traffic

This entry was posted in WordPress and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

For More Like, "Make a Full Width Page For Your WordPress Theme"
Grab the Feed or,

17 Comments

  1. Posted March 10, 2010 at 23:09 | Permalink

    This is a great tutorial for creating squeeze pages for your blog if you don’t want to pay for one! Thanks!

  2. Posted March 11, 2010 at 01:28 | Permalink

    I’ve used full width on one of my blogs but it is not working as effectively as I would have hoped so I am going to go back to the two column version.

  3. Fred
    Posted March 24, 2010 at 23:29 | Permalink

    Very cool, and just what I needed. Thanks for taking the time to post.

  4. Posted April 3, 2010 at 23:43 | Permalink

    Hi and thanks for the tutorial!

    It’s just what I’m looking for although I’m a little stuck.

    I’m using manifest as my wordpress theme, I tried the above and it doesn’t appear to work.

    It’s a single column template and as opposed to having ‘#content’ it has a #coreContent.

    Would you have any advice for this theme?

    Many thanks!

    • Posted April 5, 2010 at 00:09 | Permalink

      The theme doesnt have a sidebar, rt? I think you are looking to increase its width, so you should probably do that. Isnt it?

  5. Posted May 6, 2010 at 07:28 | Permalink

    I got the template created, and I can see it in the drop down field when I edit pages. But when I select the full width template and save the page, it remains under the default page. Also, I think my theme is way more complex than the one used in your example, and I can decipher which areas to modify to make the full width template actually full width. There’s no one place that I can change the width. There are several widths listed, but I can’t test any of them until I can get my page to save as the full width template.

    Any ideas?

  6. Posted May 14, 2010 at 07:28 | Permalink

    Thanks for the tutorial! I’ve noticed that many of the newer premium themes are now making it a default option to select whether a page is or isn’t full width. I’m glad that they are finally catching on! I use Woo Themes for most of my sites, and all of the newer themes have this feature.

    • Posted May 15, 2010 at 18:59 | Permalink

      woo themes really rock, the wp 3.0 is borrowing some of their code for menu management. :)

  7. Posted June 17, 2010 at 09:46 | Permalink

    The tutorial helped…but now I’ve discovered a bigger issue. My attributes metabox is missing! I’ve made sure I’m at the latest version of WP, optimized and repaired SQL tables, disabled and re-enabled plugins…I’m shooting blanks now.

  8. Posted June 24, 2010 at 03:48 | Permalink

    Thank you so much for the tutorial. I love the “This Just In” theme but was having issues with some content bleeding over into the sidebar. Your fix was perfect for this:
    http://www.yourbestmooove.com/blog/advanced-search/

  9. Posted July 7, 2010 at 04:04 | Permalink

    Thank you so much!!! But… how can I add posts in a full width page??? Could you help me?

  10. Jeremy
    Posted July 8, 2010 at 19:43 | Permalink

    Thank you so much for this clear explanation. I looked everywhere for this and this explained it clear and concisely.

    Thanks again for this.

  11. Posted July 10, 2010 at 16:48 | Permalink

    You ROCK…thanks so much!!!!!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Get Free Updates

Home · Archives · About · Contact · Advertise · Hire Me · RSS
© 2006 – the end of time, Arun Basil Lal. Powered by WordPress, H2O and an Awesome Bunch of Friends.