Skip to content

Instantly share code, notes, and snippets.

@srikat
Created November 19, 2015 23:16
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/0703172295be5a6ae6ba to your computer and use it in GitHub Desktop.
Save srikat/0703172295be5a6ae6ba to your computer and use it in GitHub Desktop.
How to set Heading tags for Entry Titles in Genesis conditionally.
// Wrap entry titles on 'portfolio' post type archive page in h3 tags
add_filter( 'genesis_entry_title_wrap', 'sk_set_custom_entry_title_wrap' );
function sk_set_custom_entry_title_wrap( $wrap ) {
if ( is_post_type_archive( 'portfolio' ) ) {
$wrap = 'h3';
}
return $wrap;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment