I am unable to display my new widget area
-
Using a register widget area in the functions.php file of my (stunning )child theme, I can see a new widget and am able to add stuff to it. However, I have tried many commands to display that area and none of them work. While viewing any page in my site in the customizer it says “Your theme has 1 other widget area, but this particular page doesn’t display it.”
I would like to display the widget in my header, next to the logo.The command I used:
function stunning_child_widgets_init() { register_sidebar( array( 'name' => 'Header', 'id' => 'header_1', 'before_widget' => '<div>', 'after_widget' => '</div>', 'before_title' => '<h2 class="rounded">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'stunning_child_widgets_init' );
I have tried placing code into the header.php and index.php of my parent theme (they don’t exist in my child one) along with making the changes in functions in my child theme. Please help out.I can provide with exact code of files for reference if required.
The page I need help with: [log in to see the link]
- The topic ‘I am unable to display my new widget area’ is closed to new replies.