Change Widget Heading Tag in Sidebar and Footer Area

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

By default, all headings for widgets placed in sidebars and the footer bottom area have the H4 heading tag.

If you want to change the heading tag, for example to H3, use the following PHP snippet:

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

Change the $heading value per your need (for example, H2, etc).

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.