Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Created June 17, 2015 20:44
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 kimwhite/93ec4fc730e0baa69481 to your computer and use it in GitHub Desktop.
Save kimwhite/93ec4fc730e0baa69481 to your computer and use it in GitHub Desktop.
Custom excerpt function - Genesis Sandbox widget
/* 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