Last active
June 4, 2019 19:22
-
-
Save timothyjensen/a1a071fe2b2b8206e73d25d426c585ef to your computer and use it in GitHub Desktop.
Change the default Genesis 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 | |
add_filter( 'get_the_content_more_link', 'prefix_change_more_link_text' ); | |
/** | |
* Replaces the default Genesis [Read More...] with Read More. | |
* | |
* @param string $more_link The content more link. | |
* | |
* @return string | |
*/ | |
function prefix_change_more_link_text( $more_link ) { | |
$new_more_link_text = __( 'Read More', 'child-theme-text-domain' ); | |
return sprintf( '… <a href="%s" class="more-link">%s</a>', | |
get_the_permalink(), | |
genesis_a11y_more_link( $new_more_link_text ) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment