How to change Widget Titles Markup in Genesis

Posted on Leave a comment
5/5 - (311 votes)

By default the widget titles in Genesis have h3 tag like this:

If you would like to change the h3s to another tag, like a divs or h4s, add the following in your child theme’s functions.php:

// Replace h3 with h4 for all widget titles
add_filter( 'genesis_register_sidebar_defaults', 'custom_register_sidebar_defaults' );
function custom_register_sidebar_defaults( $defaults ) {
$defaults['before_title'] = '<h4 class="widget-title widgettitle">';
$defaults['after_title'] = '</h4>';
return $defaults;
Leave a Reply

Your email address will not be published. Required fields are marked *