Sidebars one working, one not
-
I’ve registered sidebars and they are showing in the dashboard area as widgets, one of them is showing on the correct page too. But the other one doesn’t seem to be pulling it in.
I’m going a bit code-blind so can anyone see what I’m not seeing?
In my functions.php:
` <?php
if ( function_exists(‘register_sidebar’) ) {
register_sidebar(array(
‘id’ => ‘newsscroll’,
‘class’ => ‘newsscroll’,
‘name’ => __( ‘News Scroll’, ‘text_domain’ ),
‘description’ => __( ‘news scroll top of homepage’, ‘text_domain’ ),
‘before_widget’ => ‘<div class=”newsscroll-widget col-2-3″>’,‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h6 class=”newsscroll-title”>’,
‘after_title’ => ‘</h6>’,
));register_sidebar(array(
‘id’ => ‘order_form-widget’,
‘class’ => ‘order_form-widget’,
‘name’ => __( ‘Order Form’, ‘text_domain’ ),
‘description’ => __( ‘Order Form bottom of shop page’, ‘text_domain’
),
‘before_widget’ => ‘<div class=”order_form-widget-container”>’,‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h6 class=”order_form-widget-title”>’,
‘after_title’ => ‘</h6>’,
));}
?>`
Then in my page.php I have this:
` <? php
if(is_page(‘shop’)){
if ( is_active_sidebar( ‘order_form-widget’ ) ) { ?><div class=”row”><div class=”wrapper order_form-widget-container”>
<?php dynamic_sidebar( ‘order_form-widget’ ); ?></div></div><?php
}
}else {
}
?>`
I have that code the same in page-full.php which is pulling in the newscroll widget perfectly ok (I also have shop slug set as ‘shop’ in dashboard)Many thanks in advance for anyone that can see where I’ve gone wrong
Thanks Vicky
- The topic ‘Sidebars one working, one not’ is closed to new replies.