Como criar uma widget area para um tema no wordpress?
1 Respostas
Adicione no arquivo functions.php do seu tema para registrar widget area
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Name of Widgetized Area',
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
)
);
Segundo passo, para exibir os Widgets em alguma lugar no tema, utilize:
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('header-sidebar') ) : endif;