Skip to content

Instantly share code, notes, and snippets.

@nutsandbolts
Created April 15, 2015 03:43
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 nutsandbolts/712f64f49e34cacae15e to your computer and use it in GitHub Desktop.
Save nutsandbolts/712f64f49e34cacae15e to your computer and use it in GitHub Desktop.
Daily Bolt: open entry title links in a new tab
//* Open post title links in new tab
function nabm_filter_entry_title() {
function nabm_post_title_output( $title ) {
$title = sprintf( '<h1 class="entry-title" itemprop="headline"><a target="_blank" href="%s" title="%s">%s</a></h1>', get_permalink(), the_title_attribute( 'echo=0' ), get_the_title() );
return $title;
}
add_filter( 'genesis_post_title_output', 'nabm_post_title_output', 15 );
}
add_action('genesis_header', 'nabm_filter_entry_title');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment