Problem My sidebar is not displaying in the Wordpress footer.php file.
functions.php
<?php
add_action( 'widgets_init', 'social_media_sidebar' );
function social_media_sidebar() {
register_sidebar( array(
'name' => 'Social Media Sidebar Widgets',
'id' => 'social_media_sidebar_widgets',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<span style="display:none;">',
'after_title' => '</span>',
));
}
?>
sidebar.php
<div class="sidebar">
<?php dynamic_sidebar( 'social_media_sidebar_widgets' ); ?>
</div>
footer.php
<?php get_sidebar( 'social_media_sidebar_widgets' ); ?>
Note - the above footer.php call is not in a loop. That's the only thing I can think of that may be causing the widget to not display? I'm using the same call to get_sidebar in 3 other template files (within the loop) and they load just fine. I just can't get it to display in the footer. Nothing is being hidden with CSS.
What can I do to get the social_media_sidebar_widgets sidebar to display in my footer?