Focus – Registering Sidebars
I registered sidebars
function me_widgets_init() {
register_sidebar( array(
'name' => 'Events Page Sidebar',
'id' => 'eventspage_sidebar',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );
register_sidebar( array(
'name' => 'Events Page Footer',
'id' => 'eventspagefoot_sidebar',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );
}
add_action( 'widgets_init', 'me_widgets_init' );
But when I go to the page, the sidebar LOOKS different than other pages.
I’m guessing that I need to put something here:
'before_widget' => '', 'after_widget' => '',
I notice inspecting the source that all other pages using the normal sidebar have
<aside id=
But I’m not sure how to dynamically do this when registering a sidebar in FOCUS PRO.
Can you explain to me how to MANUALLY register 2 new sidebars for FOCUS PRO (a sidebar and a footer widget area)
URL: http://localhost
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
1Hi Brix
If you check the parent theme’s functions.php file you’ll see the original widget areas being created. I’m pasting them below. Use the arguments you need and add them to your widget areas:
/** * Register widgetized area and update sidebar with default widgets * * @since focus 1.0 */ function focus_widgets_init() { register_sidebar( array( 'name' => __( 'Post Sidebar', 'focus' ), 'id' => 'sidebar-post', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'focus' ), 'id' => 'sidebar-page', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); register_sidebar( array( 'name' => __( 'Footer Widgets', 'focus' ), 'id' => 'sidebar-footer', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); } add_action( 'widgets_init', 'focus_widgets_init' );Hope that helps.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.