I'm very new to WP theming and I know there are several types of functions to add Widget areas.
The following one, for example, adds a widget area dedicated for menus:
# functions.php (register a new widget area):
function newMenuWidgetArea() {
register_nav_menus(
array (
'my-custom-menu' => __('newMenu'),
'extra-menu' => __('newMenu')
)
);
}
add_action('init', 'newMenuWidgetArea');
# header.php (declare widgets in the new area to appear):
<?php
wp_nav_menu(array (
'theme_location' => 'newMenu',
'container_class' => 'newMenu')
);
?>
The problem:
I don't want to add custom menus manually for example, so I don't look for a functions that add menus and their widget areas manually.
I wish to add menus from the GUI, hence I am looking forward to use a function that create global widget areas that can serve for any purpose, and then I will add into them anything I wish directly from the GUI (menu, text area, or whatever other widget).
The question:
What is the general function to add a general-purpose/multi-purpose Widget area?
The one I have for now creates a menu. not a widget area in which I could place widgets.