Remove sidebar spacing box.

Viewing 5 posts - 1 through 5 (of 5 total)
  • #5743

    So, I tried to completely remove sidebars from my page, but even when it doesn’t load a sidebar it still has the spacing for the sidebar taken, so when you center an image/video it looks off center because of the space taken up by the not loaded sidebar. Any suggestions on how to completely get rid of it so things that are “centered” will be centered on the page? Example:


    yeah, dont know how you did that… and cant tell without seeing some of the php…. but this should fix the page that individual page…

    put this in the header.php… under the last “link rel”or before /head closes…

    <script language="javascript" type="text/javascript">

    function movevid(){
    var $theURL = window.location.href;
    var $myURL = "";
    if ($theURL==$myURL){

    and right after the body tag opens….

    add onload=”movevid()”

    like so…..

    <body onload=”movevid()” <?php body_class(); ?> <?php if(is_page())

    it will fix the one page… if you need to push it further, just add more pixels in the code… if you need to do this with any more pages, just duplicate the script and replace the urls.

    • This reply was modified 10 years, 10 months ago by gavintfn. Reason: left some extra in
    Daniel Tara

    Go to style.css and change the width of #content to 940px, then go to functions.php and change the value of $content_width to 940.


    Thank you Daniel. This worked very well. Now the only thing that happens is that any image put into a page will only maximize at 700px. Even though in the page settings, when I “insert media” it says I can choose a “large” image size of “940 x whatever” but even when I do that the resultant image in the page is resized to 700px wide. Thanks for any help.



    How did you remove the sidebar?

    Best regards

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.