Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing posts and sidebar from homepage: Education Pro
- This topic has 16 replies, 7 voices, and was last updated 7 years, 11 months ago by
Mayee.
-
AuthorPosts
-
September 4, 2015 at 10:21 am #164588
kwidrick
MemberHi all!
First, a few caveats:
a) I am comfortable with editing all of the files on the sites that I work on, and have a working knowledge of CSS, coding, etc. However, I'm not a true developer and am just getting started with some freelance design/development projects, mostly for friends who are patient with me.
b) I have searched these forums high and low and have tried all of the solutions suggested in past answers (I know it's annoying when someone doesn't try to find the answer first!). I have also googled. I think the issue is that the tutorials I'm trying to follow all seem to reference home.php, which I believe is no longer used on Education Pro (I see the front-page file and have been assuming that any references to home could be replaced with front-page).
c) The site I'm working on is not yet live -- we have a splash page up. I know that may make it harder to help, so I apologize.
NOW, the question. My client loves how I've customized Education Pro for her so far, but now tells me that she wants more of a static homepage, without any of her blog posts or sidebars showing up. Essentially, she wants to go from the Home Bottom widget to the Footer widgets.
(See screenshot attached of where the posts and sidebar are showing up.)
What code do I need to add to front-page.php and the stylesheet to make that happen? Tutorials I've tested (but have not worked) include:
http://marketingpress.com/removing-blog-post-from-home-page-in-genesis/
http://my.studiopress.com/setup/more-themes/previous-versions/education-theme/Is there a hook or tutorial I'm missing? THANKS!
September 4, 2015 at 11:53 am #164595Christoph
MemberHi,
I´m not sure if I understood you correctly and somehow your screenshot didn't get posted.
It sounds like all you would have to do is to add widgets to the home featured, home top or home middle widget areas...
(Appearance - Widgets)Alternatively you can always set a static page as front page under Settings - Reading - Front page displays.
If I´m completely off target, the screenshot might help me understand better 🙂
September 4, 2015 at 12:04 pm #164596kwidrick
MemberSorry about that! You can jump to it on Flickr here, since it doesn't seem to want to embed: https://www.flickr.com/photos/kwidrick/21114771256/
I have widgets in the home featured, home top and home middle. Nothing in the home bottom or footer widgets right now. The posts are showing up right below the home middle.
I think I just need to comment out the posts and sidebar on the homepage, but I can't tell if that's part of the loop or something else -- and I'm stuck!
September 4, 2015 at 12:16 pm #164598Christoph
MemberThank you.
Now I know what to do 😉
In the front-page.php you will find the following code:
if( $paged < 1 ) { if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) ) { //* Add education-pro-home body class add_filter( 'body_class', 'education_body_class' ); //* Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); //* Add home top widgets add_action( 'genesis_after_header', 'education_home_top_widgets' ); } }
Replace it with
if( $paged < 1 ) { if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-middle' ) ) { //* Add education-pro-home body class add_filter( 'body_class', 'education_body_class' ); //* Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); //* Add home top widgets add_action( 'genesis_after_header', 'education_home_top_widgets' ); //* Remove posts from front page and show full width layout remove_action ('genesis_loop', 'genesis_do_loop'); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); } }
September 15, 2015 at 8:57 pm #165658markus
MemberThanks Christoph, This code your shared here worked brilliantly! Thank you so much for sharing your knowledge and clarity!
cheers!
MarkusOctober 13, 2015 at 8:07 am #168025Doug
ParticipantDoesn't seem to work for me - see: http://ivyplatzerweltchek.com/
October 13, 2015 at 9:14 am #168030Christoph
MemberHi Doug,
it looks like you have set your front page to a posts page in
Settings - Reading Settings - Front page displays - A static page - Post PageThe settings above only work if you are using the front-page.php template.
Please refer to the theme setup instructions here:
http://my.studiopress.com/setup/education-pro-theme/
October 13, 2015 at 10:37 am #168039Binh
Memberthank you so much for sharing your knowledge and clarity!
February 20, 2016 at 12:21 pm #179490tamclennan
MemberHi, I've tried following this threat but am still having trouble. The site I'm working on doesn't have any blog posts, so the home page is just displaying a strip where they would be. How do I get rid of it? I already replaced the code as mentioned above.
Thanks,
AlisonFebruary 20, 2016 at 12:28 pm #179492Christoph
MemberHi Alison,
around line 507 of the style.css remove or comment out padding-top: 40px; from .site-inner
.site-inner { clear: both; padding-top: 40px; }
February 22, 2016 at 11:26 am #179618tamclennan
MemberThank you, Christoph. I was hoping there might be a way to remove it from the home page, while keeping the padding on the other pages. This solution removes the padding altogether, and I don't like the way that makes the other pages look. Any suggestions?
February 22, 2016 at 11:35 am #179619Christoph
MemberYou are welcome.
You can prefix the css class with .home
.home .site-inner {...}
February 22, 2016 at 12:40 pm #179625tamclennan
MemberThat didn't seem to change the effect to the other pages. They also lost padding.
February 22, 2016 at 12:44 pm #179627Christoph
MemberOk, I skipped a step.
Don't touch the existing .site-inner class.
But underneath add.home .site-inner { padding-top: 0; }
February 22, 2016 at 1:21 pm #179631tamclennan
MemberThat did the trick! Thank you!!!
February 26, 2017 at 7:07 pm #202037Mayee
MemberAs this is a related question (tweak education theme main page), so I'll post here to see if anyone can help.
I use education pro theme and this is my front page
How can I make the three images for “Life Coaching”, “5 Start Recommendations” & “Resources” align with the right and left sides of the header image like below:
http://i1006.photobucket.com/albums/af188/sharelord/share/3_zpst0cjwfcx.png
Which file and which line of code do I tweak?
February 28, 2017 at 11:11 am #202036Mayee
MemberAs this is a related question (tweak education theme main page), so I'll post here to see if anyone can help.
I use education pro theme and this is my front page
How can I make the three images for “Life Coaching”, “5 Start Recommendations” & “Resources” align with the right and left sides of the header image like below:
[URL=http://s1006.photobucket.com/user/sharelord/media/share/3_zpst0cjwfcx.png.html][IMG]http://i1006.photobucket.com/albums/af188/sharelord/share/3_zpst0cjwfcx.png[/IMG][/URL]
Which file and which line of code do I tweak?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.