Monday 23 February 2009

Hiding the sidebar on the static pages

Following on from step four - Make a ‘contact me’ static page

I realised when I was testing my pages I’d prefer the static pages to have the look of a normal webpage without the sidebar widgets. There are two ways to do this that I found. First to edit your template to decide not to display the sidebar on all static pages and secondly to tell each static page not to display the sidebar. I tried the first way and it didn’t work for me at all. I’m not sure if different templates work differently because I’m no html expert but I found adding the code to each page was the only way I could suppress the sidebar. So again go to your dashboard and edit your page. The pages you’ve created will come up, you need to do this for every page. Select a page to edit and in the content box, before your text or form html or whatever you’ve included in there paste this code:

<style type="text/css">
#sidebar-wrapper {display: none;}
#main-wrapper {width: 650px;}
</style>

The width variable will be specific to your template and look you want, experiment with this till you’re happy. Now do this for each page copying and pasting your code before the rest of the content. View and check it’s worked and your width settings.
If you have any problems with this and want to try the other way (editing the template) then go here. This is the tutorial I used, it’s in French so I used google translate to get the jist of it!

Hopefully now you have navigation links and have an understanding how to create the static pages that you want. Leave me a comment to let me know how you get on!

1 comment:

  1. I need a little tweaking for my blog, it doesn't seem to work for me. BUT I am very appreciative of you sharing this knowledge! THANKS :O)

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...