How change widget tittle tag from h to div. WordPress code e... open

How change widget tittle tag from h to div. WordPress code example

Approved. Code works!
This is exactly the working code that is verified by the moderator or site administrators

Often for visual or SEO reasons we want to change the title of our widget blocks. It makes it very easy!

Add the code below to your theme’s functions.php file.

function vchitel_custom_widget_title_tag( $params ) {

    $params[0]['before_title'] = '<div class="widget-title">' ;

    $params[0]['after_title']  = '</div>' ;

    return $params;

}

add_filter( 'dynamic_sidebar_params' , 'vchitel_custom_widget_title_tagg' );
0

More

Leave a Reply

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

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation