footer sidebar start

This commit is contained in:
Mark Moser 2018-08-06 08:53:22 -05:00
parent bdc22c7ad4
commit 35e279dd56
4 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,4 @@
<footer class="container"> <footer class="container">
<?php ildi_nav('social-menu'); ?> <?php ildi_nav('social-menu'); ?>
<?php get_sidebar('footer-sponsors'); ?>
</footer> </footer>

View File

@ -59,8 +59,22 @@ function register_ildi_menus() {
)); ));
} }
function ildi_register_sidebars() {
register_sidebar(
array(
'id' => 'footer-sponsors',
'name' => __( 'Footer Sponsors', 'ildi' ),
'description' => __( 'This is the sponsor and partner logos section of the footer.', 'ildi' ),
'before_widget' => '<section class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h1>',
'after_title' => '</h1>',
)
);
}
// add_action('init', 'register_ildi_menu'); // add_action('init', 'register_ildi_menu');
add_action( 'after_setup_theme', 'register_ildi_menus', 0 ); add_action( 'after_setup_theme', 'register_ildi_menus', 0 );
add_action( 'wp_enqueue_scripts', 'ildi_styles' ); add_action( 'wp_enqueue_scripts', 'ildi_styles' );
add_action( 'widgets_init', 'ildi_register_sidebars');
?> ?>

View File

@ -29,7 +29,6 @@
</main> </main>
<?php // get_sidebar(); ?>
<?php get_footer(); ?> <?php get_footer(); ?>
</body> </body>
</html> </html>

View File

@ -0,0 +1,5 @@
<?php if( is_active_sidebar('footer-sponsors') ) : ?>
<div class="sponsors">
<?php dynamic_sidebar( 'footer-sponsors' ); ?>
</div>
<?php endif; ?>