Check for the default and change it but leave custom alone (c) Christina Arasmo: https://gist.github.com/carasmo/5e9781c3fd37fa9ef29d67f4c8157657
<?php
// don't use
/** ======================================================================================
*
* Read More the_content_more_link
* Check for the default <!--more--> and change it
* but leave custom <!--more Custom Text--> alone
*
======================================================================================= */
function yourprefix_more_content_more_link( $more_link ) {
global $post;
if( strstr( $post-> post_content,'<!--more-->') ) {
return sprintf( '<a href="%s" class="more-link">%s</a>', get_permalink(), 'Read More' );
} else {
return $more_link;
}
}
add_filter( 'the_content_more_link', 'yourprefix_more_content_more_link' );
//*Custom Read More link.
add_filter( 'excerpt_more', 'child_read_more_link' );
add_filter( 'get_the_content_more_link', 'child_read_more_link' );
add_filter( 'the_content_more_link', 'child_read_more_link' );
function child_read_more_link() {
return ' ... <br><a class="more-link button blog" href="' . get_permalink() . '" rel="nofollow">Custom Read More</a>';
}