I’m trying to get a wrapper around my h3 widget title, because i want to give the h3 a vertical align bottom. Currently i’m registering my widget as following:

function usp_widgets_init(){
    if (function_exists('register_sidebar')) {
        register_sidebar(array(
            'name' => 'Front page widgets',
            'id' => 'widgets-front',
            'description' => 'Geschikt voor de USPs',
            'before_widget' => '<div class="skill hidden">',
            'after_widget' => '</div>',
            'before_title' => '<div class="widget-title""><h3>',
            'after_title' => '</h3></div>'
        ));
    }
} add_action( 'widgets_init', 'usp_widgets_init' );

Now the title will get the h3 tags, but it isn’t wrapped by the div. Does anyone know how to fix this? Btw, i can’t use display:table-cell for vertical aligning.

Current output:

<h3>Widget Title</h3>

Wished output:

<div class='widget-title'><h3>Widget Title</h3></div>

Thanks in advance!

Read more here: Widgets not adding div on before and after title


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: