ThemeShaper Forums » Thematic

Sidebar on all pages but homepage

(5 posts)
  • Started 2 years ago by anyal
  • Latest reply from hsatterwhite
  • This topic is not resolved

Tags:

  1. anyal
    Member

    I want to create a themechild that has the sidebar on all pages but the homepage. I can use the section widget or different templates to remove the content of the sidebar, but I actually want to recoup the space and move the content into the sidebar area and expand the width on the homepage. In my style.css I have the container floating right and the .main-aside floating left. How can I change the way the homepage is built so that it uses only a wide container that doesn't float?

    Thanks,
    Anya

    Posted 2 years ago #
  2. There's several ways of doing this but the quick and easy way is by using css. Just add this to your child theme style.css

    .home #container {width:960px;}
    .home #content {width:940px;}
    .home #primary, .home #secondary {display:none;}

    You can adjust the widths to suit your needs.

    Posted 2 years ago #
  3. hsatterwhite
    Member

    Couldn't you use WordPress conditionals to remove the sidebar filter if it's the homepage?

    Posted 2 years ago #
  4. Yes .. you can .. basically it's the code over here: How to remove the sidebar from a certain page?

    Change the conditional from is_page('forum') to is_home() in the PHP part and the selector from body.slug-forum to .home in the CSS part.

    Chris

    Posted 2 years ago #
  5. hsatterwhite
    Member

    Rock on, thanks Chris!

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.