Help with Widget below Header
-
I am having trouble installing the code for the widget area below my header in my child theme so I can add a sticky subscribe button. It isn’t showing up. What am I doing wrong? Help! I’m terrible at this coding thing.
My site is https://www.floridacoastalcooking.com
This is what I pasted under the “<?php /**”. (I tried removing the “<?php /**” and that didn’t work either.
_________________________________________________________<?php
/**
// Adds a widget area.
if (function_exists(‘register_sidebar’)) {
register_sidebar(array(
‘name’ => ‘Extra Header Widget Area’,
‘id’ => ‘extra-widget-area’,
‘description’ => ‘Extra widget area after the header’,
‘before_widget’ => ‘<div class=”widget my-extra-widget”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’
));
}
// Place the widget area after the header
add_action (‘__after_header’, ‘add_my_widget_area’, 10);
function add_my_widget_area() {
if (function_exists(‘dynamic_sidebar’)) {
dynamic_sidebar(‘Extra Header Widget Area’);
}
}
- The topic ‘Help with Widget below Header’ is closed to new replies.