Widget Area won't show on site?
-
So I’ve been struggling to figure out why my new widget are won’t work. I’m using the mango theme, once i register the widget area it shows on my widgets, then i go to apply the it to specefic area of the page, in my case it’s the header, and when i add the code, nothing happens, it’s like the code isn’t even there. This is the code to register my widget. `function mango_child_widgets_init(){
register_sidebar( array(
‘name’ => ‘Main Header’,
‘id’ => ‘Main_Header’,
‘before_widget’ => ‘<aside>’,
‘after_widget’ => ‘</aside>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));
}add_action( ‘widgets_init’, ‘mango_child_widgets_init’);
The second code i used to apply it to the specific place (header), i used:
`<?php if( dynamic_sidebar(‘Main_Header’) ) : else : endif; ?>
and i put it right under the header center, right before it ends it and after it starts it. P.S. im using a child theme and editing the header template works because if i put <h1>TEST</h1> and it works. I’ve also tried deactivating all plugins and re-activating. Is there something i need to do with a loop or something, im a newbie at this, and this so far is the thing i can’t figure out. If anyone can help me please and thank you.
- The topic ‘Widget Area won't show on site?’ is closed to new replies.