I have a question about Wordpress register a second sidebar for a new sub-menu i will use for some blog-post on my site.(on a specific-page only)
I read how to Register a new Sidebar! In the first 3 lines of the code below you see what have saved in my themes function__php and it seems to work, i am not shure if is correct, but the Backend shows me now 2 sidebar-areas in the widget-sector.(before there was none i remember)
this i include:
**// If Dynamic Sidebar Exists
if (function_exists('register_sidebars'))
register_sidebars(2);**
{
// Define Sidebar Widget Area 1
register_sidebar(array(
'name' => __('Widget Area 1', 'html5blank'),
'description' => __('Description for this widget-area...', 'html5blank'),
'id' => 'widget-area-1',
'before_widget' => '<div id="%1$s" class="%2$s">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
// Define Sidebar Widget Area 2
register_sidebar(array(
'name' => __('Widget Area 2', 'html5blank'),
'description' => __('Description for this widget-area...', 'html5blank'),
'id' => 'widget-area-2',
'before_widget' => '<div id="%1$s" class="%2$s">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
// Define Sidebar Widget Area 3
register_sidebar(array(
'name' => __('Widget Area 3', 'html5blank'),
'description' => __('Description for this widget-area...', 'html5blank'),
'id' => 'widget-area-3',
'before_widget' => '<div id="%1$s" class="%2$s">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'
));
}
Now, i am a little bit confused, because in the fist setup of my site there was a widget-area 1! that holds the head-menu, then the widget-area 2! that holds the standart-themes-sidebars: serach field and some widgetized text :P.
now i dont know how to get the second sidebar fully correct registred and how to programm the php in the copyed sidebar2.php
see here:
<!-- Sidebar -->
<aside id="sidebar">
<div class="sidebar-widget3">
<?php if(!function_exists('dynamic_sidebar2') || !dynamic_sidebar('widget-area-3')) ?>
</div>
</aside>
<!-- /Sidebar -->
should i put the widgets(search-field and text) in my backend in the sidebar-areas or should i leave it in the widget areas?
its a generall-understanding problem for me, amd i hope someone can help me out, because i am a bloody beginner.
tnx a lot.![this is the actuall setup, that is confusing me and i like to have this steps fixed soon...