Skip to content

Instantly share code, notes, and snippets.

@gspice
Last active September 18, 2017 04:52
Show Gist options
  • Save gspice/7e265f5bbf11e8b20e2f6eb98f092ca4 to your computer and use it in GitHub Desktop.
Save gspice/7e265f5bbf11e8b20e2f6eb98f092ca4 to your computer and use it in GitHub Desktop.
Add this code snippet to your front-page.php file, at the bottom of the utility_pro_homepage_setup() function to swap out any h4 headers for h2.
// Hat tip to Gary Jones (@GaryJ) for providing the explanation
// on what was happening and the code on how to change it.
add_filter( 'genesis_markup_entry-title_open', 'gmj_replace_widget_element' );
add_filter( 'genesis_markup_widget-entry-title_close', 'gmj_replace_widget_element' );
function gmj_replace_widget_element( $string ) {
return str_replace( 'h4', 'h2', $string );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment