Site logo

Archived topic

Replace H2 Widget Title

7 replies · Started by Ariel on October 8, 2019

Viewing posts 1–8 of 8

Hi there, i want to replace Widget Titles from H2 to H3, H4 or nothing. Could you help me?

Regards.

Thanks! I have fixed!

No problem :)

Hey i added this code snippet - but the widgets are still h2 -

add_filter( 'filter_name', 'generate_start_widget_title' );
function generate_start_widget_title()
{ 
    return '<h4 class="widget-title">';
}

add_filter( 'filter_name', 'generate_end_widget_title' );
function generate_end_widget_title()
{ 
    return '</h4>';
}

https://welderpick.com/6013-vs-7018-welding-electrodes-compared/

Can you please help!

I have also tried this one --> did not work either.

add_filter( 'generate_start_widget_title', 'db_start_widget_title' );
function db_start_widget_title()
{ 
    return '<p class="widget-title">';
}

add_filter( 'generate_end_widget_title', 'db_end_widget_title' );
function db_end_widget_title()
{ 
    return '</p>';
}

This one worked - thank you!

add_filter( 'generate_start_widget_title', 'tu_adjust_widget_title' );
function tu_adjust_widget_title() {
      return '<h4 class="widget-title">';
}

add_filter( 'generate_end_widget_title', 'tu_adjust_widget_title_end' );
function tu_adjust_widget_title_end() {
      return '</h4>';
}

Glad you found the solution :)

This archived topic is closed to new replies.