• Hello

    I would like to change the heading tags of widget titles in the footer from the default H4 to H3.

    I assume the best way to do this in OceanWP is using custom code in the functions.php correct?

    There is a tutorial I found here but I would need it to be customized for OceanWP:
    https://www.denisbouquet.com/wordpress-h1-widget/

    Hopefully this is an easy solution you can provide here for anyone looking to optimize their SEO, and maybe add the future to the WP customizer in the future ??

    Thanks in advance for your help!
    Anthony

    • This topic was modified 5 years, 2 months ago by Anthony Froio.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Please add the below code to the child theme’s functions.php file to do it –

    function prefix_widget_heading(	$heading ) {
    	$heading = 'h3';
            return $heading;
    }
    add_filter( 'ocean_sidebar_heading', 'prefix_widget_heading' );

    Hello Amith,

    I’m using this code in my child theme but nothing happens :

    function prefix_widget_heading(	$heading ) { 
    	$heading = 'p';         
    	return $heading;
    } 
    	add_filter( 'ocean_sidebar_heading', 'prefix_widget_heading' );

    Can you check that here :
    https://wpdogs.wb2.eu/univers-chat/

    Htaccess :
    ID : dogandcat
    Pass : dogandcat2020

    Have you got an idea ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Heading Tags of Footer Widget Titles from H4 to H3’ is closed to new replies.