/ Published in: PHP
This code must be added to functions.php in the child theme
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function my_sidebar() { 'name' => __( 'Sidebar', 'theme' ), 'id' => 'widget-1', 'description' => 'This is a sidebar', 'class' => 'content', 'before_widget' => '<div id="widget-1" class="widget widget-1">', 'after_widget' => "</div></div>", 'before_title' => '<div class="widget-title">', 'after_title' => '</div><div class="widget-content">', ) ); } add_action( 'widgets_init', 'my_sidebar' );