On a site that I worked on today it was required to change the widget title HTML output from
<h4 class="widget-title widgettitle">Meta</h4>
to
<h2 class="widget-title widgettitle"><span>Meta</span></h2>
for a specific widget for styling it uniquely.
i.e., before:
after:
While it is possible to customize title markup for all widgets in Genesis using genesis_register_sidebar_defaults filter, I do not think it can be applied to just a specific widget.
Therefore I used the following simple code.
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
[…] Want to do this change but only for a specific widget? Here’s one way using jQuery: https://sridharkatakam.com/changing-wordpress-widget-title-heading-tag-using-jquery/ […]