I have been working on a website using WordPress http://1stgoringheath.org.uk/, there are some pages that I didn't want to have the sidebar on, so I made a template and removed get_sidebar

Now I have just a blank area where the sidebar was, which I want to remove and allow the main content div fill the space.

The pictures below show the empty space

With Sidebar

Without Sidebar

How can I fill the empty space where the sidebar was?


Links to page.php and style.css are below https://drive.google.com/file/d/1aVTgmO9uuJtbXlofDeS-bDSxsRawj2vd/view?usp=sharing https://drive.google.com/file/d/1pV6OW5b0WlipUrs0fAWZAXBcLoR1_n14/view?usp=sharing

  • You give us to see two different pages — "with" and "without", "home" and "Contact Us".
    – Max Yudin
    Commented Nov 26, 2017 at 9:23
  • can you give us the link of your site ? Commented Nov 26, 2017 at 9:44
  • 1stgoringheath.org.uk Commented Nov 26, 2017 at 9:46

3 Answers 3


You may add this code to your custom CSS :

.page-template-pageWithOutSidebar .entry-header, .page-template-pageWithOutSidebar .entry-content {
    padding-right: 0;

Within the parent container of the section whose left margin has to be removed add a class= "row ", and then in the child div element class = "col - * - 12"; , and then put * as md or sm or anything as required.


You can only remove the blank space by editing the custom css. First you need to be working on a Child's theme to ensure your theme's update do not reverse your changes. Then find the main class and set the width to 100%. A link to your website can help us give you further assistance

  • A link is in the original post Commented Nov 26, 2017 at 9:54
  • Where would the custom css go would it be in the edited template, or the style.css Commented Nov 26, 2017 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.