Skip to content

Instantly share code, notes, and snippets.

@timothyjensen
Last active June 4, 2019 19:22
Show Gist options
  • Save timothyjensen/a1a071fe2b2b8206e73d25d426c585ef to your computer and use it in GitHub Desktop.
Save timothyjensen/a1a071fe2b2b8206e73d25d426c585ef to your computer and use it in GitHub Desktop.
Change the default Genesis read more link
<?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( '&hellip; <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