Created
June 17, 2015 20:44
-
-
Save kimwhite/93ec4fc730e0baa69481 to your computer and use it in GitHub Desktop.
Custom excerpt function - Genesis Sandbox widget
This file contains 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
/* custom excerpt function for the homepage */ | |
function excerpt_read_more_link( $output ) { | |
if ( is_home() ) { | |
global $post; | |
return $output . '<a class="more-link" href="' . get_permalink( $post->ID ) . '" title="' . get_the_title( $post->ID ) . '">Read more ... </a>'; | |
} else { | |
return $output; | |
} | |
} | |
add_filter( 'the_excerpt', 'excerpt_read_more_link', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment