Deprecated: Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /var/www/html/wp-includes/functions.php on line 5383

Remove sidebar from theme and centre template

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

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

    Hi,

    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,

    Kari

    http://www.zarcollective.com

    #1358
    mmsatori
    Keymaster

    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!

    Sincerely,
    Andrew / Satori Studio

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.