Community Forums › Forums › Archived Forums › Design Tips and Tricks › Education: Different layout for Home Page
- This topic has 6 replies, 3 voices, and was last updated 12 years, 8 months ago by
Susan.
-
AuthorPosts
-
July 4, 2013 at 6:09 pm #49260
Rosesilk
MemberHello,
I'm playing around with the Education Theme on a dummy site. http://ultimatelifestyleplan.com/
I would like to have the far right sidebar (the green one) only on the homepage. I know that I can set the content-sidebar-sidebar layout as default and then change the layout for every post & page I make to be content-sidebar.
Is there an easier way? Logically the default layout should be content-sidebar. Only the homepage needs the variation but there is no "page" for me to modify the layout to content-sidebar-sidebar for the homepage.
Thank you. I appreciate your help.
http://ultimatelifestyleplan.com/July 4, 2013 at 7:20 pm #49266Susan
ModeratorTry this tutorial by Brian Lis:
http://brianlis.com/add-a-unique-sidebar-to-the-genesis-home-page.htm/ - I believe this method overrides the "default" for the homepage, so you could do this for the homepage, and have a default content-sidebar on the remainder of the site.July 4, 2013 at 7:40 pm #49267Rosesilk
MemberThank you, Susan. I think this is getting a bit complicated for me. Is there any way I could choose the "content-sidebar-sidebar" layout (as recommended for the theme) but add a bit of code that says if it isn't the home page, it should not show the secondary sidebar?
If not, I think I'll just choose the layout I want for each page.
Thank you very much for your help.
July 4, 2013 at 7:52 pm #49270Susan
ModeratorYou could add some conditional code to your functions code that if it is not the homepage, you could remove the secondary sidebar. (I would need to test some code to double-check the correct way to do it.)
There is a code snippet to remove the secondary sidebar site-wide, so I think it's a matter of modifying that snippet:
//* Unregister secondary sidebar unregister_sidebar( 'sidebar-alt' );
July 5, 2013 at 10:38 am #49335Brad Dalton
ParticipantTry the Genesis Layouts plugin http://wordpress.org/plugins/genesis-layout-extras/
Here's some code you can use to change the layout conditionally if needed.
https://gist.github.com/braddalton/5924781
July 5, 2013 at 10:56 am #49343Rosesilk
MemberOH My Word, Brad. Thank you!
First of all, where have I been? I thought I knew "all things genesis" and yet somehow, I never noticed this plugin. This is exactly what I was asking for.
And then a double, super-dooper thank you for the code.
I really appreciate your help, Brad and Susan. You can mark this post as "happily closed"!
July 5, 2013 at 11:01 am #49346Susan
ModeratorI'm glad Brad was able to resolve this for you. I will have to make note of that plugin, too - I've heard of it, but it's not one I've used myself.
-
AuthorPosts
- The topic ‘Education: Different layout for Home Page’ is closed to new replies.