Custom Theme Page Template


Custom Wide Page Template for SME Tech

Today was spent creating a custom page template for one of my websites – SME Technology – to use a wide format for single column, no sidebar pages.

WordPress Custom Pages Easy

custom wordpress page template featured imageIt’s quite easy to add a custom page to a WordPress theme… At least if an existing page template is used. This time the main goal was to use a custom style sheet to increase the page width and reduce white space between the header menu bar and the page title.

To get this right, I had to use a custom header.php file with the custom page template. Again, the theme header.php was the basic file, the only change being the link to the new style sheet.

For some reason getting a relative path to the stylesheet gave the most trouble. Maybe I’ve just got used to using full urls for stylesheets coding, and don’t usually worry about relative paths – why bother if the stylesheet is only used on the site it’s designed for. This time I wanted to package the template files for a download for other users, so a relative path was needed.

Design Road to Custom Page Template

I had already tried the guide for the theme to increase page width, but for some reason the ways described didn’t work for me – or didn’t give the result I wanted.

At first I modified the parent theme stylesheet to get the layout I wanted – and would have left things this way except… changing the spacing for the header messed up some other layouts – so a better method was needed, and the custom page template was developed (if modifying an existing template can really be called development).

Finally, with some spare time in hand, the template got finished and installed on the site. Now of course I need to change the pages to use this template, and can eventually replace the modified theme stylesheet with the original.

me on google plus+Mike Otgaar

Advertisements

About Mike

Web Developer and Techno-geek Saltwater fishing nut Blogger

Posted on September 15, 2012, in Templates and tagged , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: