Remove sidebar from theme and centre template

Front page Support Forums Sensei Theme Support Remove sidebar from theme and centre template

This topic contains 1 reply, has 2 voices, and was last updated by  satori 3 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1356



    I would like to know how to remove the sidebar from php files. I would like to create category pages and the sidebar re-appears on this layout. I already have modified it for the home page & blog page as per the previous upload lessframwork.css.

    I can remove the from the template however the page doesn’t centre. Is there a way to do this or part of the code to edit.

    Thanks again,




    Hey Kari,

    in WordPress, the sidebar is inserted by the “get_sidebar” template tag. To remove the sidebar from category pages, you’ll need to edit the “category.php” file found in the root of the theme, line 52 is what you need. When you remove the sidebar from the php file, the content will still remain left-floated and take up only part of the width because of the CSS declarations; you’ll need to add a CSS override to “style.css” saying something like this:
    .category #content { width: 100% !important; }

    I hope this helps. Let me know if there are any difficulties with the process!

    Andrew / Satori Studio

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

You must be logged in to reply to this topic.