widget in child theme
-
Thanks for this theme, but I’have a problem.
I created a child theme:
my css:/* Theme Name: Bootstrap Basic Child Theme URI: https://www.example.it Description: Tema Child per il tema Bootstrap Basic Author: bla bla bla Author URI: https://example.com/about/ Template: bootstrap-basic Version: 0.1.0 */
directory is : boostrap-basic-child
In function.php I add widget area:
my function.php:add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); function enqueue_parent_theme_style() { wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' ); } /* Register widget area */ function register_widget_areas() { register_sidebar( array( 'name' => __( ' Header Widget Area', 'bootstrap-basic-child' ), 'id' =>'header-1', 'description' => __( 'Add widgets here to appear in your header.', 'bootstrap-basic-child' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'register_widget_areas' );
Finally I add widgets on template but it’s not working!
In admin / theme / widget nothing happens!
It isn’t the new widget area!if I modify directly in the parent theme it’s perfectly works!
can someone help me? Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘widget in child theme’ is closed to new replies.