Created
November 1, 2015 00:58
-
-
Save joedooley/77dc1b3ab87a50dbe5b0 to your computer and use it in GitHub Desktop.
/** Conditionally Customize Read More Text */
Conditionally Customize Read More Link
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
<?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