criar uma widget area no WordPress

PerguntasCategoria: Wordpresscriar uma widget area no WordPress

Como criar uma widget area para um tema no ?

1 Respostas

Adicione no arquivo 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;