Se trovi qualcosa che non capisci puoi lasciarlo nella sezione dei commenti e cercheremo di aiutarti il più velocemente possibile.
Esempio 1: area widget personalizzata wordpress
/**
* Register our sidebars and widgetized areas. - Most times you can place this instead your fuction file.
*
*/functionarphabet_widgets_init(){register_sidebar(array('name'=>'Home right sidebar','id'=>'home_right_1','before_widget'=>'','after_widget'=>'','before_title'=>''
,'after_title'=>'',));}add_action('widgets_init','arphabet_widgets_init');?>
/* show sidebar - template file */
if(is_active_sidebar('home_right_1')):?><divid="primary-sidebar"class="primary-sidebar widget-area"role="complementary">dynamic_sidebar('home_right_1');?>div>endif;?>
Esempio 2: come creare un widget in wordpress
/* add this code in footer.php child theme file */
<divid="footer-sidebar"class="secondary"><divid="footer-sidebar1">if(is_active_sidebar('footer-sidebar-1')){dynamic_sidebar('sidebar1');}?>div><divid="footer-sidebar2">if(is_active_sidebar('footer-sidebar-2')){dynamic_sidebar('sidebar2');}?>div>div>
/* add this code in functions.php child theme file */
register_sidebar( array(
'name' => 'Footer #1',
'id' => 'sidebar1',
'before_title' => '<h3class="widget-title">',
'after_title' => 'h3>',
) );
register_sidebar( array(
'name' => 'Footer #2',
'id' => 'sidebar2',
'before_title' => '<h3class="widget-title">',
'after_title' => 'h3>',
) );
}
add_action( 'wp_enqueue_scripts', 'twentytwenty_child_enqueue_child_styles' );
valutazioni e recensioni
Apprezziamo che tu voglia aggiungere valore alle nostre informazioni partecipando con la tua esperienza nelle referenze.