Education – Remove Sidebar on Home

Community Forums Forums General Discussion Education – Remove Sidebar on Home

This topic is: not resolved

Tagged: 

This topic contains 10 replies, has 5 voices, and was last updated by  braddalton 1 year, 7 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #18237

    jfortenberry
    Participant
    Post count: 2

    I am setting up a site in a subfolder of the main site (http://www.trustestatelaw.net/wp/) using the Education theme. I would like to remove the sidebar and the loop from below the CTA section on the home page. I have added this code to home.php:

    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
    remove_action( ‘genesis_sidebar’, ‘genesis_do_sidebar’ );

    That took care of the loop, but didn’t eliminate the sidebar.

    I also tried:

    remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ );

    That didn’t work either.  How do I get rid of that sidebar on the homepage?

    #18260

    SoZo
    Moderator
    Post count: 1573

    Add this to your style sheet

    .home #content,
    .home #sidbar {
    display: none;
    }


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #18538

    jfortenberry
    Participant
    Post count: 2

    Thanks for the prompt response SoZo. That does work. I’m a little finicky, though, and don’t really like using CSS to hide page elements. It seems a bit clunky. I’m also a little concerned about the SEO effect as that could be a bunch of hidden links. Is there a way to actually stop WordPress/Genesis from inserting the sidebar on the homepage?

    Thanks again.

    #18776

    achieve1
    Participant
    Post count: 4

    I am trying to accomplish exactly the same thing – (http://www.mississaugaribfest.ca) and am doing exactly as is outline above, except the primary sidebar will not disappear even with the css code.

    I would really appreciate any help you can offer.

    My goal is to have the page end just the way it does for (http://www.trustestatelaw.net/wp/)

    Thanks so much

    #18781

    jfortenberry
    Participant
    Post count: 2

    Change “sidbar” to “sidebar” in the code that SoZo gave us.

    #18783

    achieve1
    Participant
    Post count: 4

    Oh my stars!!! Thank you, thank you, thank you!!!

    I’ve spent 2 hours trying to get it to work .

    I can’t tell you how much I appreciate it.

    #18789

    PinkInk
    Participant
    Post count: 23

    Sorry to butt in, but it seems I am trying to achieve something similar to this using only the Mocha theme. I’ve tried hiding the sidebar and content using the CSS style sheet however I can’t seem to differentiate home from the entire site. Below is the CSS from the home page, as you can see it’s using the same style on all pages, do you have any ideas I can try?

    .content-sidebar #content-sidebar-wrap, .full-width-content #content-sidebar-wrap, .sidebar-content #content-sidebar-wrap


    Tiff

    #18793

    achieve1
    Participant
    Post count: 4

    I am far from an expert – but what I noticed was done here was adding the first bit of code to home.php and then the additional code went to the style sheet.

    I think you have to change the home only on the home.php.

    Does that make sense? Please understand I am not an expert, just a user but I feel your pain.

    #18796

    PinkInk
    Participant
    Post count: 23

    Hi achieve1 thank you so much for you reply, started to feel a little invisible here LOL

    I’ve got the remove action in my home.php but it doesn’t make a difference, I also tried using remove_action for the sidebar wrap although the code may not be right?
    remove_action( ‘genesis_before_content_sidebar_wrap’, ‘mocha_home_content’ );


    Tiff

    #18918

    achieve1
    Participant
    Post count: 4

    I don’t know anything about the mocha theme – but I would think it is a child theme. Presumably you are building this based on the genesis framework, in which case you should not have to make reference to the theme (we were using education theme and there’s no mention of it in the code).

    I think the placement is important in the home.php, and making sure the css code is

    .home #content,
    .home #sidebar {
    display: none;
    }

    Unfortunately that’s about the extent of my knowledge.

    #18931

    braddalton
    Participant
    Post count: 9690

    How about the width of the home page?

    This will force full width if you paste it into the home.php file
    [php]
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );
    [/php]
    You’ll then need to edit your CSS for the home widgets


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.