Removing Primary Sidebar

Community Forums Forums Design Tips and Tricks Removing Primary Sidebar

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  Ozzy 1 year, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2631

    avhslibrary
    Participant
    Post count: 18

    My site is amadorvalleyhs.org

    I sought out help to  remove the primary sidebar from my site. And was fortunate to get this bit of code which I placed in the functions.php file.

    remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ );

    It works out well on the home page but does not do so well on other pages where I am also using the secondary sidebar:

    Eg: http://www.amadorvalleyhs.org/student-life/athletics

    There is extra space where the primary sidebar should be, preventing the test in the main area from moving over (filling in the area where the primary sidebar was.)

    Any help to get the text to move over would be appreciated!  Erik

     

     

    #2638

    Ozzy
    Participant
    Post count: 211

    if you’re just wanting to remove the sidebar from the home page, you could either force a full width page on the home page or do put something like this in your functions.php file:

    // remove sidebar from home
    add_action ('genesis_before_loop', 'remove_sidebar_home');
    function remove_sidebar_home() {
    if (is_home() ) {
    remove_action ('genesis_after_content','genesis_get_sidebar');
    }
    }


    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    • This reply was modified 1 year, 8 months ago by  Ozzy.
    #2661

    avhslibrary
    Participant
    Post count: 18

    Hi–I don’t need for the home. The code I have in place is working fine for the home. The problem I have is with the subpages.

    #2671

    avhslibrary
    Participant
    Post count: 18

    For example:

    http://www.amadorvalleyhs.org/student-life/athletics

    The text does not go over all the way even though the sidebar is not visible.

    #2680

    Ozzy
    Participant
    Post count: 211

    have you tired going to Genesis > Theme Settings and changing the default layout to full width?


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.