ThemeShaper Forums » Thematic

[closed]

Site-Wide Full Width Layout

(7 posts)
  • Started 2 years ago by vicky515
  • Latest reply from helgatheviking
  • This topic is resolved
  1. vicky515
    Member

    Hi there,

    I've come across a lot of posts and blogs about how to implement a full-width layout in Thematic for specific places, and I've successfully implemented this, but what if I want it to be site-wide? What if I don't want to use sidebars at all?

    Would you do it the same way?
    Right now I'm looking at Devin's tutorial on WPTheming, except instead of making a template in step 2, just sticking with page.php
    http://wptheming.com/2010/03/custom-page-templates-thematic/

    Or is there a "better way" to implement it?

    Posted 2 years ago #
  2. you're going to run into trouble w/ the template approach if you want to kill sidebars on blog posts and archives too.

    in your research you'll have seen that turning off sidebars in specific places requires conditional logic. if you want it site-wide, just don't use any conditions.

    heck WP now has some pre-made functions so you don't have to add a new function to return false to a filter.

    add_filter( 'thematic_sidebar', '__return_false' );

    bam, goodbye sidebar.

    Posted 2 years ago #
  3. vicky515
    Member

    Wow, it's really that simple! I just tried it and it worked perfectly. Thank you, Helga <3

    I decided to play around with this to see what else I could use it for. My themes are very very simple and I end up spending most of my effort removing things I don't need. Is this a complete list of Thematic filters? http://themeshaper.com/thematic/guide/?page_id=12

    Posted 2 years ago #
  4. faeree
    Member

    Hi! I tried this and yay! it does remove sidebars, however it still leaves the space of the sidebar on my theme.

    I am trying to get my posts to be full page width (there is no categories, just a list of posts on a page that are used for a slider). Would I just save my template-page-blog.php page as the same code listed on template-page-fullwidth.php page?

    Posted 2 years ago #
  5. You shouldn't have to do anything additional with the templates, the rest should just be CSS. Just adjust your CSS widths accordingly, currently they are fixed width so they won't flow to fill in where the sidebar previously was.

    Posted 2 years ago #
  6. faeree
    Member

    Ahhh CSS- yay! Ok will firebug the posts then- thanks!

    Posted 2 years ago #
  7. yeah, my function only removes the sidebar from the markup. it is up to you to style the remaining markup appropriately. this should work.

    #container {
    width: 940px;
    margin: 0 auto;
    }
    
    #content {
    width: 100%;
    }
    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.