Community Forums › Forums › Archived Forums › Design Tips and Tricks › Footer outside container in Lifestyle pro. Help!
- This topic has 5 replies, 2 voices, and was last updated 9 years, 3 months ago by jondalrymple.
-
AuthorPosts
-
December 11, 2014 at 1:50 pm #134295jondalrympleMember
I'm working in Lifestyle pro and I made a custom home page with front-page.php file. I made it a full width page instead of content-sidebar. But now the footer and footer widgets are outside the main container. Not sure how it got that way or how to fix it. Has anyone else had this happen to them?
I registered a few widget areas in the functions.php and I modified my CSS a bit but not anything to do with the footer. I don't have a url to show but here is the front-page.php file:
<?php
/**
* This file adds the Home Page to the Lifestyle Pro Theme.
*
* @author StudioPress
* @package Lifestyle Pro
* @subpackage Customizations
*/add_action( 'genesis_meta', 'lifestyle_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function lifestyle_home_genesis_meta() {if ( is_active_sidebar( 'home-top-left' ) || is_active_sidebar( 'home-top-right' ) || is_active_sidebar( 'home-bottom-left' ) || is_active_sidebar( 'home-bottom-right' ) ) {
// Force content-sidebar layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );// Add lifestyle-pro-home body class
add_filter( 'body_class', 'lifestyle_body_class' );// Remove the default Genesis loop
remove_action( 'genesis_loop', 'genesis_do_loop' );// Add homepage widgets
add_action( 'genesis_loop', 'lifestyle_homepage_widgets' );}
}function lifestyle_body_class( $classes ) {
$classes[] = 'lifestyle-pro-home';
return $classes;}
function lifestyle_homepage_widgets() {
if ( is_active_sidebar( 'home-top-left' ) || is_active_sidebar( 'home-top-right' ) ) {
echo '<dive class="wrap"><div class="home-top">';
genesis_widget_area( 'home-top-left', array(
'before' => '<div class="home-top-left widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-top-right', array(
'before' => '<div class="home-top-right widget-area">',
'after' => '</div>',
) );echo '</div></div>';
}
if ( is_active_sidebar( 'home-bottom-left' ) || is_active_sidebar( 'home-bottom-center' ) || is_active_sidebar( 'home-bottom-right' ) ) {
echo '<div class="wrap"><div class="home-bottom">';
genesis_widget_area( 'home-bottom-left', array(
'before' => '<div class="home-bottom-left widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-bottom-center', array(
'before' => '<div class="home-bottom-center widget-area">',
'after' => '</div>',
) );genesis_widget_area( 'home-bottom-right', array(
'before' => '<div class="home-bottom-right widget-area">',
'after' => '</div>',
) );echo '</div></div>';
}
}
genesis();
December 11, 2014 at 2:55 pm #134309tejonesMemberDid you realize you can change the layout regarding the sidebars, etc., using the Genesis Theme Options in the dashboard? That might have been the best way to accomplish that.
This way, your footer and header should stay inside the main container.
Todd E Jones
http://www.grafixcatmedia.comDecember 11, 2014 at 3:45 pm #134320jondalrympleMemberYes, thanks for mentioning that, but I wanted to have some widget areas that are not available that way. I'm adding the genesis slider, and a text widget in the home top. And I am putting three featured post widgets across in footer bottom. So I don't see a way to do that without making a custom home page.
December 11, 2014 at 3:52 pm #134322tejonesMemberYou might take the front page idea from Enterprise Pro and utilize it in your theme.
That is the set up that it uses. Feature area at the top, three widgets below. See how it is structured and maybe you can make your custom front page from that.
Todd E Jones
http://www.grafixcatmedia.comDecember 12, 2014 at 12:04 pm #134397jondalrympleMemberHi tejones, thanks for the suggestion, I checked out the enterprise pro theme, but it has the footer outside the site-container too. It does have the three widgets across the bottom, but that's not a problem for me. What I need is to have the footer contained like the header, the navigation, and the main content of the site.
I'm going to put the site up today and add a link so you can see it. I don't know if it is a css problem or php problem. It seems like it is the php since it only happens on the home page.
December 12, 2014 at 1:55 pm #134411jondalrympleMemberWell, I figured it out. I had a typo in the front-page.php file. Can you see it here:
echo ‘<dive class=”wrap”>
This was part of the code that made the home-top widget area. This is an example of how one simple typo can cause considerable grief.
Moral of the lesson: don't write code, copy and paste instead?
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.