Community Forums › Forums › Archived Forums › General Discussion › How do I Remove Blog, side bar, & footer from home page
- This topic has 7 replies, 3 voices, and was last updated 11 years, 4 months ago by thinktaylor.
-
AuthorPosts
-
December 12, 2012 at 11:25 am #4738thinktaylorMember
> I am trying to remove everything blow the Orange bar from the home page. I don't want the side bar or the blog to show.
>
> URL
> http://mentorsonwheels.com/December 12, 2012 at 1:05 pm #4753billericksonMemberI'd have to see your theme's code to give a better answer, but here's a good starting place:
1. Does your theme have a home.php file? If not, create one and put this in it: https://gist.github.com/4270594
2. Inside home.php, right before the genesis() line, add the following: https://gist.github.com/4270606
That will make the homepage full width (so there's no sidebar), and remove the blog post loop from running.
December 12, 2012 at 2:00 pm #4765thinktaylorMemberThis is the error I got when I did that, Billerickson:
Parse error: syntax error, unexpected '<' in /home/mentorso/public_html/wp-content/themes/education/home.php on line 57
December 12, 2012 at 2:03 pm #4767thinktaylorMemberThis is what is inside of the Educational Child Theme's home.php
*****************************************************
<?php
add_action( 'genesis_meta', 'education_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function education_home_genesis_meta() {global $paged;
if( $paged < 1 ) {
if ( is_active_sidebar( 'slider' ) || is_active_sidebar( 'intro' ) || is_active_sidebar( 'featured' ) || is_active_sidebar( 'call-to-action' ) ) {add_action( 'genesis_before_content', 'education_home_loop_helper', 1 );
}
}}
function education_home_loop_helper() {
echo '<div id="home-featured">';
genesis_widget_area( 'slider', array(
'before' => '<div class="slider widget-area">'
) );
genesis_widget_area( 'intro', array(
'before' => '<div class="intro widget-area"><div class="inner">',
'after' => '<div class="clear"></div></div></div><!-- end .intro -->') );
genesis_widget_area( 'featured', array(
'before' => '<div class="featured widget-area"><div class="inner">',
'after' => '<div class="clear"></div></div></div><!-- end .featured -->') );
genesis_widget_area( 'call-to-action', array(
'before' => '<div class="call-to-action"><div class="banner-left"></div>',
'after' => '<div class="banner-right"></div></div><!-- end .call-to-action -->') );
echo '</div>';
}
genesis();December 12, 2012 at 2:23 pm #4769billericksonMemberChange it to this: https://gist.github.com/e96d8669be4502217e47
(I added the two lines to the top of the file, but below the <?php )
December 12, 2012 at 2:59 pm #4773thinktaylorMemberBillerickson,
We are getting closer. Thanks, take a look at what happened now to the featured areas on the post and it took out the bolding of the intro statements.
December 12, 2012 at 4:47 pm #4793Brian BournMemberIf you take a look at the source code or use an inspection tool like FireBug you can see that there are some extra quotes in some of the ids and classes starting at home-featured. Also, some of the quotes are "curly". If you edit the file again and fix the quotes with straight ones and remove the extras it should work.
Be sure you are using a text editor so the quotes don't converted to curly.
Bourn Creative | bourncreative.com | Twitter
December 12, 2012 at 7:16 pm #4825thinktaylorMemberTHAAAAAAAAAAAAAAAAAAANK YOU!!! I was able to get it now, Brian.
and a BIIIIIIIIIIIIIIIGGG THANK YOU TO Billerickson. You had it nailed, I just needed to take your two lines and add it to the original code. Everything worked perfectly.
Sweet!!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.