Skip to content

Instantly share code, notes, and snippets.

@srikat
Created December 3, 2015 23:04
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 srikat/a15881ebc0267e763448 to your computer and use it in GitHub Desktop.
Save srikat/a15881ebc0267e763448 to your computer and use it in GitHub Desktop.
How to replace entry title heading tag for a specific Featured Post widget using GFPC.
// Change h2 markup to h1 for a specific GFPC widget
add_filter( 'gfpc_do_post_title_gfpc-widget-5', 'sk_custom_title', 10, 2 );
function sk_custom_title( $title, $instance ) {
$replace = 'h2';
$replace_with = 'h1';
$title = str_replace( $replace, $replace_with, $title );
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment