Sidebar not working
-
Hello
I’ve added a sidebar to my theme and in the code it is showing:
<div class=”wrap-col sidebar”>
</div>
so it is bringing in sidebar, but in the dashboard I have added a plugin to the widget and it is not showing. I’ve added the plugin to the footer widget and it works there, and I’ve tried added other things to this widget and they don’t display….
I have this in my functions:
<?php add_action( 'widgets_init', 'louischild_widgets_init' ); function louischild_widgets_init() { register_sidebar( array( 'name' => __( 'Newsscroll Sidebar', 'louischild' ), 'id' => 'sidebar-newsscroll', 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'louischild' ), 'class' => 'widget newsscroll', 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', ) ); } ?>
and then call it into the code on a page here:
<?php if(is_page('homepage-2')) { get_sidebar('newsscroll'); } else { } ?>
Any ideas why it isn’t working and also not showing it’s class as a ‘widget’
many thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sidebar not working’ is closed to new replies.