Creating WordPress Static Full Page without sidebar
Since many of DFF's content require larger page width, the default Page template which contains the sidebar must be removed. Here are the steps needed to create a new Page template without sidebar:
(the instructions below assume you are using `default` theme)
- Go to your WordPress directory `/wp-content/themes/default/`.
- Copy the `page.php` file and name it `page_wo_sidebar.php`.
- Open the new `page_wo_sidebar.php` to edit it.
- Add this line within the comment block on the top of the PHP file:
* Template Name: Page without sidebar
so that the final result of the new comment block will be like this:
/**
* Template Name: Page without sidebar
* @package WordPress
* @subpackage Default_Theme
*/
- Remove the entire line containing:
- Save the new `page_wo_sidebar.php` template file.
- Look for the main div tag with the id="content". Usually after get_header();
- Replace the class element class="narrowcolumn" to class="widecolumn".
- Add a style div element attribute `style="width:92%; margin:0 30px; padding:0;"`.
- Your new div id="content" element should look like this:
<div id="content" class="widecolumn" role="main" style="width:92%; margin:0 30px; padding:0;">
To use your new Page Template, simply select the `Page without sidebar` in the Attribute > Template drop-down box while editing or adding a page.
There are no comments on this page. [Add comment]