Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created June 28, 2012 20:58
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 billerickson/3013862 to your computer and use it in GitHub Desktop.
Save billerickson/3013862 to your computer and use it in GitHub Desktop.
<?php
/**
* Make excerpt elipsis a link
*
* @author Bill Erickson
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_more
*
* @param string $more
* @return string
*/
function be_excerpt_link( $more ) {
return '<a href="' . get_permalink() . '">' . $more . '</a>';
}
add_filter( 'excerpt_more', 'be_excerpt_link', 20 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment