ThemeShaper Forums » Thematic

Can 1 page be set to hide all of the asides?

(7 posts)
  • Started 5 years ago by jdunbar
  • Latest reply from jdunbar
  • This topic is resolved
  1. I have one of Amazon's aStores, and would like to have it open up within the body of my site rather than in its own page. Unfortunately, the aStore is wider than by body content, so I was wondering if just that page could be displayed without the asides, leaving plenty of room for the store to appear within the content of my site.

    Posted 5 years ago #
  2. Let us assume the page you have set up for your aStore is named Store and has a pageslug of store as well. Now the good thing is that Thematic inserts the page/post slug in the body class already.

    What you could do is to add something like the following into your childthemes stylesheet:

    body.slug-store #sidebar {
         display:none;

    The body class generated out of the page/post slug always starts with slug- and is followed by the actual slug. So a page/post with the slug of swim-suit-exchange-program would have a body class of slug-swim-suit-exchange-program.

    You could also do this in functions.php by adding a function that does something like if this page is named store then do not display the sidebar div, but i can not code such stuff.

    No clue which approach will be executed quicker, saves more bandwidth and what not and which one is more elegant though.

    Posted 5 years ago #
  3. Functions.php would technically be faster—technically. The CSS would be a simple solution for 1 page.

    Posted 5 years ago #
  4. That worked great. Thanks!

    I adjusted the container to 100% width to compensate for the lack of the sidebar, but the page is still the length it would be if the sidebars were displayed. Is there a way I can shorten this? I still wanted to display my subsidiary asides if at all possible, and the extra white space would probably deter further scrolling.

    Posted 5 years ago #
  5. Take a look here: How to remove the sidebar from a certain page?

    Cheers,

    Chris

    Posted 5 years ago #
  6. Oh, thanks Chris! :)

    Posted 5 years ago #
  7. Thanks, Chris! That seems to have worked.

    Posted 5 years ago #

RSS feed for this topic

Reply

You must log in to post.