• Hi there!

    I need to add two more footer widgets to the Twenty Sixteen theme, which only had two.

    Using suggestions found online, I successfully registered them on the functions.php thus:

    register_sidebar( array(
    		'name'          => __( 'Content Bottom 3', 'twentysixteen' ),
    		'id'            => 'sidebar-4',
    		'description'   => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
    		'before_widget' => '<section id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</section>',
    		'before_title'  => '<h2 class="widget-title">',
    		'after_title'   => '</h2>',
    	) );
    
    	register_sidebar( array(
    		'name'          => __( 'Content Bottom 4', 'twentysixteen' ),
    		'id'            => 'sidebar-5',
    		'description'   => __( 'Appears at the bottom of the content on posts and pages.', 'twentysixteen' ),
    		'before_widget' => '<section id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</section>',
    		'before_title'  => '<h2 class="widget-title">',
    		'after_title'   => '</h2>',
    	) );

    And, yay! They appeared on the widget page. However they don’t appear on the front end. I am stumped on what to do on the footer.php page.

    I know something needs to change in this snippet, but I don’t know what and can’t seem to find any thing online:

    </div><!-- .site-content -->
    
    		<footer id="colophon" class="site-footer" role="contentinfo">
    			<?php if ( has_nav_menu( 'primary' ) ) : ?>
    				<nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>">
    					<?php
    						wp_nav_menu( array(
    							'theme_location' => 'primary',
    							'menu_class'     => 'primary-menu',
    						 ) );
    					?>

    If possible, please guide me on what to add and where.

    Thanks a bunch!
    Mari

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding Footer Widgets to Twenty Sixteen theme’ is closed to new replies.