• frumgenius

    (@frumgenius)


    Hello and thanks for your time.

    Here is a link to my blog. As you can see, I am running a template with two sidebars.

    Im looking to create a page template with no sidebars for certain pages on my site.

    So I made a page template called nosidebars.php, which effectively removed the sidebars from the page.

    Problem is that when using this page template, the used area of text only extends as far as where the sidebars would be. What code do I need to put in that would tell WordPress to extend the usable space all the way to the end of either side of the page. (when using the nosidebars.php template)

    Thanks in advance!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • SpankMarvin

    (@spankmarvin)

    Hi there

    Your best bet is to make a small template tweak and then use CSS.

    In your custom page template, rename the content div (i.e. the div wil class=”content”) to something unique to the one-column layout, e.g. div class=”onecolcontent”

    In your template’s style.css file, find this section:

    .contentLayout .content
    {
    	position: relative;
    	margin:0;
    	padding:0;
    	border:0;
    	float: left;
    	overflow: hidden;
    	width: 49%;
    }

    Replace the above code with the following:

    .contentLayout .content, .contentLayout .onecolcontent
    {
    	position: relative;
    	margin:0;
    	padding:0;
    	border:0;
    	float: left;
    	overflow: hidden;
    }
    .contentLayout .content {
            width: 49%;
    }
    
    .contentLayout .onecolcontent {
            width: 99%;
    }

    And I reckon that’s it. Does that achieve what you’re after?

    John

    Thread Starter frumgenius

    (@frumgenius)

    Omygosh YES!! Youre amazing!! Now I have to figure out how to fix the background of that page template, then Im done!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Creating a Page w/ No Sidebars’ is closed to new replies.