WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Forcing 2 column display for static pages (2011 theme) (6 posts)

  1. MC
    Member
    Posted 2 years ago #

    I am using the default theme and have set a static page to the front page of the site. In doing so, it seems to disable the 2 column layout, showing only the contents of the page. When I view the where the posts are shown, the sidebar displays.

    How can I force this theme to always display both columns in the layout ?

    Basically, I want to display the sidebar on the front page (and on all pages, this site is going to be mostly static pages)

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    All pages in Twenty Eleven are single column. If you want to change the default page template & the theme's CSS, you'll need to start by creating a child theme.

  3. MC
    Member
    Posted 2 years ago #

    Thank you. This is going to help me structure my work. Before I posted, I tried hacking it a little, I removed an if statement wrapping around the sidebar.php file, but nothing changed. I need to go find a copy of the default theme and revert it now, because I changed it on the server. Going to be more careful in the future.

    I am going to start my child theme now, but still looking to figure out the exact mod I will need to place in my child theme to force the sidebar display.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    You'll need a copy of page.php in your child theme with a call to get_sidebar(). Plus you'll need to start amending the CSS via your child's stylesheet to cope with a two-column layout. I'd recommend using Firefox with the Firebug add-on for this latter task.

  5. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    Twenty Eleven has a page template with sidebar which you could use.

    however, using this might be tedious if you are working with mostly pages;

    Twenty Eleven manages the sidebar layout mainly with a body_class .singlular, which you need to suppress on all pages;

    http://www.transformationpowertools.com/wordpress/twenty-eleven-sidebar-on-single-posts-and-pages

    if you want to keep single posts without sidebar, you need to edit this line in the function blacklist_body_class :
    if( is_single() || is_page() ) :
    and remove is_single() ||

  6. MC
    Member
    Posted 2 years ago #

    Yeah!!!! I have it working!! The child theme is installed and have edited it as needed.

    I found a few back and forth references to the ten and eleven versions of the theme in the codex docs, so I took a chance to normalize the references and examples all to the new version of the theme.

    Thank you both so much for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic