Forked from joshuadavidnelson/remove-genesis-entry-title-link.php
Last active
August 29, 2015 14:20
-
-
Save katmoody/2134478ebb635b5b3b8a to your computer and use it in GitHub Desktop.
Changing to add link to enable underline effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Remove Links from Post Titles in Genesis | |
* | |
* @author Joshua Nelson | |
* @link http://joshuadnelson.com | |
* | |
*/ | |
add_filter( 'genesis_post_title_output', 'jdn_custom_post_title' ); | |
function jdn_custom_post_title( $title ) { | |
if( get_post_type( get_the_ID() ) == 'post' ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline"><a href="entry-title">' . $post_title . '</a></h2>'; | |
} | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment