Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Last active February 19, 2017 17:44
Show Gist options
  • Select an option

  • Save hellofromtonya/f806f78aaf993651cc233c3882afeeb7 to your computer and use it in GitHub Desktop.

Select an option

Save hellofromtonya/f806f78aaf993651cc233c3882afeeb7 to your computer and use it in GitHub Desktop.
Agency Pro - Change the default Widget Title HTML tag from <h4> to <h2>
add_filter( 'genesis_register_widget_area_defaults', 'agency_pro_change_widget_title_to_h2', 99 );
/**
* Change the Widget Title HTML tag element from a <h4> to <h2>.
*
* @since 1.0.0
*
* @param array $defaults Array of default parameters
*
* @return array
*/
function agency_pro_change_widget_title_to_h2( array $defaults ) {
$defaults['before_title'] = '<h2 class="widget-title widgettitle">';
$defaults['after_title'] = "</h2>\n";
return $defaults;
}
@hellofromtonya
Copy link
Copy Markdown
Author

Instructions:

  1. Open your Agency Pro's functions.php file in an editor
  2. Scroll to the very bottom of the file
  3. Copy and paste the above code into the file
  4. Save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment