WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
Footer disappears on default template in child theme? (2 posts)

  1. littlecuriosity
    Member
    Posted 11 months ago #

    Hi I'm working on a child theme of twenty twelve with custom functions for the footer, but its not appearing at all. The posts just end with no footer html on the homepage or any page with the default template.

    This is my code in the functions.php

    // Register footer widgets
    register_sidebar( array(
    	'name' => __( 'Footer Widget One', 'tto' ),
    	'id' => 'sidebar-4',
    	'description' => __( 'Found at the bottom of every page (except 404s, optional homepage and full width) as the footer. Left Side.', 'tto' ),
    	'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    	'after_widget' => '</aside>',
    	'before_title' => '<h3 class="widget-title">',
    	'after_title' => '</h3>',
    ) );
    
    register_sidebar( array(
    	'name' => __( 'Footer Widget Two', 'tto' ),
    	'id' => 'sidebar-5',
    	'description' => __( 'Found at the bottom of every page (except 404s, optional homepage and full width) as the footer. Center.', 'tto' ),
    	'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    	'after_widget' => "</aside>",
    	'before_title' => '<h3 class="widget-title">',
    	'after_title' => '</h3>',
    ) );
    
    register_sidebar( array(
    	'name' => __( 'Footer Widget Three', 'tto' ),
    	'id' => 'sidebar-6',
    	'description' => __( 'Found at the bottom of every page (except 404s, optional homepage and full width) as the footer. Right Side.', 'tto' ),
    	'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    	'after_widget' => "</aside>",
    	'before_title' => '<h3 class="widget-title">',
    	'after_title' => '</h3>',
    ) );

    and this in my footer

    <?php
    /**
     * The template for displaying the footer.
     *
     * Contains footer content and the closing of the
     * #main and #page div elements.
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?>
    	</div><!-- #main .wrapper -->
    	<footer id="colophon" role="contentinfo">
    
    <?php
    			/* footer sidebar */
    			if ( ! is_404() ) : ?>
    				<div id="footer-widgets" class="widget-area">
                    	<div class="one">
    					<?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
    						<?php dynamic_sidebar( 'sidebar-4' ); ?>
    					<?php endif; ?>
    					</div>
                        <div class="two">
    					<?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
    						<?php dynamic_sidebar( 'sidebar-5' ); ?>
    					<?php endif; ?>
    					</div>
                         <div class="three">
    					<?php if ( is_active_sidebar( 'sidebar-6' ) ) : ?>
    						<?php dynamic_sidebar( 'sidebar-6' ); ?>
    					<?php endif; ?>
                        </div>
    				</div><!-- #footer-widgets -->
    		<?php endif; ?>
    
    		<div class="site-info">
            © <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<?php bloginfo( 'name' ); ?>
    				</a>
    
    			<span class="credits"><a target="_blank" href="http://brightMist.co.uk">Bright Mist Designs</a></span>
    
    		</div><!-- .site-info -->
    	</footer><!-- #colophon -->
    </div><!-- #page -->
    
    <?php wp_footer(); ?>
    </body>
    </html>

    Any ideas?

    Thanks for your help
    Little Curiosity

  2. I used your code in a child theme and didn't have any problems seeing the footer or the footer widgets.

    Is there something in your child theme's CSS that's causing your problem?

Reply

You must log in to post.

About this Theme

About this Topic