Skip to content

Instantly share code, notes, and snippets.

@jpmarchand
Last active November 6, 2015 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpmarchand/03b4ba419f4d2c7a84c9 to your computer and use it in GitHub Desktop.
Save jpmarchand/03b4ba419f4d2c7a84c9 to your computer and use it in GitHub Desktop.
Change widget titles HTML markup in Genesis Framework. Source: https://sridharkatakam.com/how-to-change-widget-titles-markup-in-genesis/
<?php
//* Replace <h3> with <h4> HTML tags for all widget titles in Genesis
add_filter('genesis_register_sidebar_defaults', 'prefix_register_sidebar_defaults');
function prefix_register_sidebar_defaults($defaults) {
$defaults['before_title'] = '<h4 class="widget-title widgettitle">';
$defaults['after_title'] = '</h4>';
return $defaults;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment