-
▼
2011
(334)
-
▼
October
(29)
- How to Make a WordPress Theme in Dreamweaver
- How to Disable Footers in WordPress Themes
- How to Enable URL Rewriting on WordPress
- How to Change a WordPress Template in Dreamweaver
- How to Place a Search Box in a WordPress Theme
- How to Edit HTML in a Wordpress Blog
- How to Hide a WordPress Blog From the Public
- How to Update Twitter From WordPress
- How to Add Products to a WordPress eShop
- How to Edit WordPress Gallery Spacing
- How to Embed YouTube Into WordPress Sidebar
- How to Create a Full Width Page Template for WordP...
- How to Log in to WordPress With GoDaddy
- How to Turn off Widgets in a Wordpress Theme
- How to Delete Avatars in Wordpress
- How to Reinstall WordPress to Root
- How to Edit a Footer in a WordPress File
- How to Change the Header Size in WordPress 3.0
- How to Delete WordPress From cPanel
- How to Change WordPress Gallery Spacing
- How to Use Template Tags in WordPress in Widgets
- How to Access WordPress Page Files in BlueHost cPanel
- How to Rotate the Header Image in WordPress
- How to Connect Tumblr WordPress
- How to Migrate a Hosted WordPress to Your Own Domain
- How to Install Bulk Plugins in WordPress
- How to Make Changes on Multiple WordPress Posts
- How to Include a Graph in My WordPress Blog
- How to Embed WMV Video in WordPress
-
▼
October
(29)
adsense
How to Create a Full Width Page Template for WordPress
1. Create a new, blank file in the plain-text or code editor of your choice. Open up your 'page.php' file from the following location:/yoursite/wp-content/themes/name-of-theme/'Yoursite' is the directory where you installed WordPress, and 'name-of-theme' is the name of the theme you want to edit. Copy the contents of 'page.php,' and paste it into the blank file. Save the blank file as 'your-template-name.php,' where 'your-template-name' is whatever name you want to give the file.
2. Add the following line of code to the very top of your new template file:
WordPress reads this code, and when it sees 'Template Name,' it knows that 'Your Name Here' is a template it should offer when you create pages in the dashboard. Give it a descriptive name, such as 'Full-Width Page.' Save your file.
3. Read through the PHP file you just created, and look for this code entry:
In the case of multiple sidebars, you might see code for the other sidebars similar to the following:
Remove codes for sidebars wherever you see them. Save your file again.
4. Open up your 'header.php' file, and check that the
tag includes the following line of code:
If you do not see it there, add that tag within the
tag. Save the 'header.php' file. Now go back to your full-width template file, and make sure the
or
tag that wraps around your page content has its class set to
like so:
'>
5. Open up your 'style.css' file, and add the following:.page-template-layout-full-width-php .page {width: 100%;}Change '.page-template-layout-full-width-php' to reflect the name you gave your template's file. A file named 'my-new-page.php' will be '.page-template-my-new-page-php'. This CSS code ensures that any page set to use the full-width template will display its contents across the full width of the screen.
6. Log in to the WordPress dashboard, and create a new page. After adding your content to the editor, find the drop-down under Template in the Page Attributes box on the right of the screen. Click the drop-down and select your new template. Click the blue Update button in the box above to publish the page.
3:31 AM | Filed Under | 0 Comments
Comments
Popular Posts
-
1. Log in to your Weebly account. 2. Click 'Theme Editor.' 3. Click on the 'Design' tab. 4. Select 'Edit CSS/HTM...
-
1. Sign up for a publisher account at Bidvertiser. Submit basic contact information and confirm your email address to get started. 2. Lo...
-
1. Log in to your WordPress dashboard. 2. Open the 'Appearance' section on the left side of the WordPress dashboard and then cli...
-
1. Open your WordPress Dashboard in your preferred browser. It is accessed at the '/wp-admin' location of your site. For example, ...
-
Facebook Widget 1. Create a Facebook fan page for your blog, if you don't already have one. You will have to manually share content wi...
-
1. Download and install the WordPress for BlackBerry app via BlackBerry App World. Download the version that corresponds with your BlackBe...
-
1. Go to your WordPress blog's administrative control panel. 2. Click the 'Settings' button on the left-side navigation menu...
-
1. Click the 'Add Contact' button on the 'Add New Post' page. This opens the 'Add a Contact Form' page. 2. Click...
-
1. Register an account with Amazon Web Services Cloud. If you have an existing Amazon account, enter your email address in the appropriate...
-
1. Log into your WordPress.com account using your user name and password. 2. Hover your cursor over the 'My Blogs' tab at the to...
Post a Comment