WordPress.org

Ready to get started?Download WordPress

Forums

Remove the Right SideBar on all but main page (5 posts)

  1. drexnefex
    Member
    Posted 7 years ago #

    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: http://www.akershoek.com/wp/ (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.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

  3. Jeroen
    Member
    Posted 7 years ago #

    You can find your answer right here:

    http://forum.animalbeach.net/viewtopic.php?t=311

    I hope that will help you.

  4. drexnefex
    Member
    Posted 7 years ago #

    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.

    Example:
    http://www.shanedrexler.com/blog

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

    Good Example:
    http://www.akershoek.com/wp/animals/
    Bad Example:
    http://shanedrexler.com/blog/?page_id=3

    So again, i would like for my site to work Exactly like Jeroen's site. (http://www.akershoek.com/wp). 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.

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic