Support » Themes and Templates » Remove the Right SideBar on all but main page

  • Im trying to remove the right sidebar on all pages but my main page.

    I installed the Angia Photo Gallery and would like my right sidebar to go away when i open the photo gallery–it takes up real estate that i would like my photos to occupy.

    This guy’s site does exactly what i want: (right side bar on main page, but goes away once you click on a photo link).

    I’m using the Andreas 01 1.3 Theme.

    I’ve been poking around for a while and can’t figure out if this is an issue with my CSS, PHP or both.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    What do you consider to be “the main page”? What do you consider to be not “the main page”?

    It’s probably as simple as commenting out the sidebar code in single.php and other files in your theme (but not in index.php).

    Alternatively, you might just edit sidebar.php and add an “if (is_home()) { … }” around the whole thing.

    How you do it depends on what *precisely* it is that you want to do. Your explanation is one of those things that seems good enough, but really isn’t. Show us your website. Say “I want it here, but not here.” That sort of thing. Details are very, very important.



    You can find your answer right here:

    I hope that will help you.

    Otto42 – Thanks for your help. Let me try to clarify:

    I am using the Adreas Andreas 01 1.3 Theme. When my website first loads the home page or main page there are 3 columns– the left sidebar, center and a right sidebar.


    When i go to my Photo Page (link in the left sidebar) i would like for the right sidebar to go away.

    Good Example:
    Bad Example:

    So again, i would like for my site to work Exactly like Jeroen’s site. ( His site loads with 3 columns on his main or home page and then the right sidebar goes away once you enter into any of his photo pages.

    i’ve recieved the suggestion to remove this from my gallery-xxx.php pages: <?php list_subpages_andreas01(); ?>
    but i dont even have that code in any of my gallery-xxx.php pages.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Ahh. Make a copy of the existing page template that you’re using, give it a new name, modify it to remove that sidebar space entirely (this may mean adding CSS tweaks to widen the center column), then set that page to use your new template.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove the Right SideBar on all but main page’ is closed to new replies.