Skip to content

Instantly share code, notes, and snippets.

@joedooley
Created November 1, 2015 00: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 joedooley/77dc1b3ab87a50dbe5b0 to your computer and use it in GitHub Desktop.
Save joedooley/77dc1b3ab87a50dbe5b0 to your computer and use it in GitHub Desktop.
/** Conditionally Customize Read More Text */ Conditionally Customize Read More Link
<?php
/** Conditionally Customize Read More Text */
add_filter( 'excerpt_more', 'choosy_blog_read_more_link' );
add_filter( 'get_the_content_more_link', 'choosy_blog_read_more_link' );
add_filter( 'the_content_more_link', 'choosy_blog_read_more_link' );
function choosy_blog_read_more_link() {
if ( is_home() )
return '<button class="more-link" href="' . get_permalink() . '">Continue Reading</button>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment