Footer Widget and Footer Outside Wrap

Community Forums Forums Design Tips and Tricks Footer Widget and Footer Outside Wrap

This topic is: resolved

Tagged: ,

This topic contains 9 replies, has 2 voices, and was last updated by  Marcy 1 year, 3 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #60563

    designbytracy
    Participant
    Post count: 51

    Why are my Footer Widget and Footer outside the wrap on the home page and not on the other pages of the following site in development?

    http://designbytracy.com/dev/tortediveneziaREV/


    http://designbytracy.com/dev/tortediveneziaREV/
    #60575

    Marcy
    Participant
    Post count: 383

    I see the #footer-widgets and the #footer outside the .wrap on your home page and all the other pages I looked at. That’s where it should be.

    OK. I see, you mean #wrap, not .wrap.
    It is probably the way the home.php is coded. Can you post the code for your home.php?

    (Your site is lovely! :)


    • This reply was modified 1 year, 3 months ago by  Marcy. Reason: Added comment
    • This reply was modified 1 year, 3 months ago by  Marcy. Reason: Added comment
    #60722

    designbytracy
    Participant
    Post count: 51

    It is not outside the wrap on the other pages. I want it to be outside on all pages like it is on the home page.


    #60727

    Marcy
    Participant
    Post count: 383

    Can you please tell me which theme you are using? Or post the code from your home.php? I can’t tell you how to fix it without seeing the code.


    #60731

    Marcy
    Participant
    Post count: 383

    You are using the Executive theme. And there is an extra </div> in your home.php right before the line
    <div id=”footer-widgets” class=”footer-widgets”>
    instead of at the end.

    In the original Executive home page, everything is as it should be.
    So did you make any edits to home.php?
    Did you remove this section from home.php
    genesis_widget_area( ‘home-top’, array(
    ‘before’ => ‘<div class=”home-top widget-area”>’,
    ) );

    Or do you just not have a widget in that area?

    There is an extra </div> there.


    #60738

    designbytracy
    Participant
    Post count: 51

    I didn’t edit my home.php (at least that I remember).

    <?php
    
    add_action( 'genesis_meta', 'executive_home_genesis_meta' );
    /**
     * Add widget support for homepage. If no widgets active, display the default loop.
     *
     */
    function executive_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-middle' ) ) {
    
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    		add_action( 'genesis_loop', 'executive_home_sections' );
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    		add_filter( 'body_class', 'executive_body_class' );
    		add_action( 'genesis_after', 'executive_slider_excerpt_position' );
    
    		/** Add body class to home page **/		
    		function executive_body_class( $classes ) {
       			$classes[] = 'executive-home';
      			return $classes;
    		}
    
    		/** Moves the slider pager if the sidebars are active and the screen is wide enough */
    		function executive_slider_excerpt_position() {
    				?>
    				<script type="text/javascript">
    					 jQuery(document).ready(function() {
    						if (jQuery(".slide-excerpt").length > 0) {
    							jQuery(".flex-control-nav").addClass("nav-pos-excerpt");
    						}
    					});
    				</script>
    				<?php		
    		}
    	}
    }
    
    function executive_home_sections() {
    
    	if ( is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-cta' ) || is_active_sidebar( 'home-middle' ) ) {
    
    		genesis_widget_area( 'home-slider', array(
    			'before' => '<div class="home-slider widget-area">',
    		) );
    
    		genesis_widget_area( 'home-top', array(
    			'before' => '<div class="home-top widget-area">',
    		) );
    
    		genesis_widget_area( 'home-cta', array(
    			'before' => '<div class="home-cta widget-area">',
    		) );
    
    		genesis_widget_area( 'home-middle', array(
    			'before' => '<div class="home-middle widget-area">',
    		) );
    		   
    	}
    
    }
    
    genesis();

    #60739

    designbytracy
    Participant
    Post count: 51

    I did edit my functions.php some.

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    
    load_child_theme_textdomain( 'executive', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'executive' ) );
    
    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', __( 'Executive Theme', 'executive' ) );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/executive' );
    
    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'executive_add_viewport_meta_tag' );
    function executive_add_viewport_meta_tag() {
        echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }
    
    /** Add support for custom header */
    /* add_theme_support( 'genesis-custom-header', array(
    	'width' 	=> 1140,
    	'height' 	=> 100
    ) ); */
    
    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    /** Sets Content Width */
    $content_width = apply_filters( 'content_width', 680, 680, 1020 );
    
    /** Create additional color style options */
    add_theme_support( 'genesis-style-selector', array(
    	'executive-brown' 	=>	__( 'Brown', 'executive' ),
    	'executive-green' 	=>	__( 'Green', 'executive' ),
    	'executive-orange' 	=>	__( 'Orange', 'executive' ),
    	'executive-purple' 	=>	__( 'Purple', 'executive' ),
    	'executive-red' 	=>	__( 'Red', 'executive' ),
    	'executive-teal' 	=>	__( 'Teal', 'executive' ),
    ) );
    
    /** Unregister layout settings */
    genesis_unregister_layout( 'content-sidebar-sidebar' );
    genesis_unregister_layout( 'sidebar-content-sidebar' );
    genesis_unregister_layout( 'sidebar-sidebar-content' );
    
    /** Unregister secondary sidebar */
    unregister_sidebar( 'sidebar-alt' );
    
    /** Add new image sizes */
    add_image_size( 'featured', 285, 100, TRUE );
    add_image_size( 'portfolio', 300, 200, TRUE );
    add_image_size( 'slider', 1140, 445, TRUE );
    
    /** Remove the site description */
    remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
    
    /** Relocate the post info */
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    add_action( 'genesis_before_post_title', 'genesis_post_info' );
    
    /** Customize the post info function */
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    	if (!is_page()) {
    	    $post_info = '
    	    <div class=\'date-info\'>' .
    	    	__('posted on', 'executive' ) .
    		    ' [post_date format="F j, Y" before="<span class=\'date\'>" after="</span>"] ' .
    		    __('by', 'executive' ) . ' [post_author_posts_link] [post_edit]
    	    </div>
    	    <div class="comments">
    	    	[post_comments]
    	    </div>';
    	    return $post_info;
    	}
    }
    
    /** Change the default comment callback */
    add_filter( 'genesis_comment_list_args', 'executive_comment_list_args' );
    function executive_comment_list_args( $args ) {
    	$args['callback'] = 'executive_comment_callback';
    	
    	return $args;
    }
    
    /** Customize the comment section */
    function executive_comment_callback( $comment, $args, $depth ) {
    
    	$GLOBALS['comment'] = $comment; ?>
    
    	<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
    
    		<?php do_action( 'genesis_before_comment' ); ?>
    		
    		<div class="comment-header">
    			<div class="comment-author vcard">
    				<?php echo get_avatar( $comment, $size = $args['avatar_size'] ); ?>
    				<?php printf( '<cite class="fn">%s</cite> <span class="says">%s:</span>', get_comment_author_link(), apply_filters( 'comment_author_says_text', __( 'says', 'executive' ) ) ); ?>
    				<div class="comment-meta commentmetadata">
    					<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( '%1$s ' . __('at', 'executive' ) . ' %2$s', get_comment_date(), get_comment_time() ); ?></a>
    				<?php edit_comment_link( __( 'Edit', 'executive' ), g_ent( '&bull; ' ), '' ); ?>
    				</div><!-- end .comment-meta -->
    		 	</div><!-- end .comment-author -->			
    		</div><!-- end .comment-header -->	
    
    		<div class="comment-content">
    			<?php if ($comment->comment_approved == '0') : ?>
    				<p class="alert"><?php echo apply_filters( 'genesis_comment_awaiting_moderation', __( 'Your comment is awaiting moderation.', 'executive' ) ); ?></p>
    			<?php endif; ?>
    
    			<?php comment_text(); ?>
    		</div><!-- end .comment-content -->
    
    		<div class="reply">
    			<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    		</div>
    
    		<?php do_action( 'genesis_after_comment' );
    
    	/** No ending </li> tag because of comment threading */
    
    }
    
    /** Create portfolio custom post type */
    add_action( 'init', 'executive_portfolio_post_type' );
    function executive_portfolio_post_type() {
    	register_post_type( 'portfolio',
    		array(
    			'labels' => array(
    				'name' => __( 'Portfolio', 'executive' ),
    				'singular_name' => __( 'Portfolio', 'executive' ),
    			),
    			'exclude_from_search' => true,
    			'has_archive' => true,
    			'hierarchical' => true,
    			'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
    			'public' => true,
    			'rewrite' => array( 'slug' => 'portfolio' ),
    			'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
    		)
    	);
    }
    
    /** Change the number of portfolio items to be displayed (props Bill Erickson) */
    add_action( 'pre_get_posts', 'executive_portfolio_items' );
    function executive_portfolio_items( $query ) {
    
    	if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'portfolio' ) ) {
    		$query->set( 'posts_per_page', '12' );
    	}
    
    }
    
    /** Add support for 1-column footer widget */
    add_theme_support( 'genesis-footer-widgets', 1 );
    
    /** Register widget areas **/
    genesis_register_sidebar( array(
    	'id'			=> 'home-slider',
    	'name'			=> __( 'Home - Slider', 'executive' ),
    	'description'	=> __( 'This is the slider section on the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-top',
    	'name'			=> __( 'Home - Top', 'executive' ),
    	'description'	=> __( 'This is the top section of the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-cta',
    	'name'			=> __( 'Home - Call To Action', 'executive' ),
    	'description'	=> __( 'This is the call to action section on the home page.', 'executive' ),
    ) );
    genesis_register_sidebar( array(
    	'id'			=> 'home-middle',
    	'name'			=> __( 'Home - Middle', 'executive' ),
    	'description'	=> __( 'This is the middle section of the home page.', 'executive' ),
    ) );
    
    //* Customize the credits
    add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' );
    function custom_footer_creds_text() {
    echo '<div class="creds"><p>';
    echo 'copyright &copy; ';
    echo date('Y');
    echo ' &middot; <a href="http://TortediVenezia.com">Torte di Venezia</a> &middot; created by <a href="http://designbytracy" title="Design by Tracy">Design by Tracy</a>';
    echo '</p></div>';
    }
    
    /**
    * Filter the genesis_seo_site_title function to use an image for the logo instead of a background image
    *
    * The genesis_seo_site_title function is located in genesis/lib/structure/header.php
    * @link http://blackhillswebworks.com/?p=4144
    *
    */
     
    add_filter( 'genesis_seo_title', 'bhww_filter_genesis_seo_site_title', 10, 2 );
     
    function bhww_filter_genesis_seo_site_title( $title, $inside ){
    $child_inside = sprintf( '<a href="%s" title="%s"><img src="'. get_stylesheet_directory_uri() .'/images/header.jpg" title="%s" alt="%s"/></a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ), esc_attr( get_bloginfo( 'name' ) ) );
    $title = str_replace( $inside, $child_inside, $title );
    return $title;
    } // End bhww_filter_genesis_seo_site_title

    #60741

    designbytracy
    Participant
    Post count: 51

    The thing is, I really want the footer widgets to extend the full width of the screen like they do on the home page throughout the site. I was trying to accomplish this, but it only happened on the home page and I think it happened by accident. I’m not sure what I did…classic move!


    #60772

    designbytracy
    Participant
    Post count: 51

    I think I ended up working out what I wanted. It ended up being some changes to the #wrap and #inner widths.


    #60776

    Marcy
    Participant
    Post count: 383

    OK. That’s great! I thought you wanted the home page widgets to fit like the other pages. Yes, to go the other way, you can change your widths. I’m glad it’s working the way you want.


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

You must be logged in to reply to this topic.