Skip to content

Instantly share code, notes, and snippets.

@conor-egan
Forked from csknk/tidy_excerpts
Last active January 3, 2016 11:09
Show Gist options
  • Save conor-egan/8454624 to your computer and use it in GitHub Desktop.
Save conor-egan/8454624 to your computer and use it in GitHub Desktop.
/* Custom Excerpt */
// Remove default hellip
function carawebs_remove_hellip( $more ) {
$return = str_replace('[...]', '', $more);
return $return;
}
add_filter('excerpt_more', 'carawebs_remove_hellip');
// Build a new excerpt with a nice Read More link
function carawebs_custom_excerpt() {
echo get_the_excerpt(); ?>&hellip;<br><a href="<?php echo get_permalink();?>">Read More&hellip;</a><?php
}
// Add to a Thesis 2.x hook
add_action ('hook_after_custom_excerpt', 'carawebs_custom_excerpt');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment