Changing widgets in functions.php
-
I want to change the widget-title from <h1 to <h3 in my SemPress child theme.
I know I can do this in my child theme’s functions.php by changing the following code from the parent theme’s functions.php:
function sempress_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar 1', 'sempress' ), 'id' => 'sidebar-1', 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => "</section>", 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); register_sidebar( array( 'name' => __( 'Sidebar 2', 'sempress' ), 'id' => 'sidebar-2', 'description' => __( 'An optional second sidebar area', 'sempress' ), 'before_widget' => '<section id="%1$s" class="widget %2$s">', 'after_widget' => "</section>", 'before_title' => '<h1 class="widget-title">', 'after_title' => '</h1>', ) ); } add_action( 'init', 'sempress_widgets_init' );
Despite a lot of research and some tries, I haven’t been able to get something workable. I gather I need to use remove_action somehow. But nothing I’ve read has penetrated this thick skull far enough to produce something usable.
Could somebody please tell me exactly what my code needs to be?
Thank you!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Changing widgets in functions.php’ is closed to new replies.