Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Created July 9, 2016 20:06
Show Gist options
  • Save hellofromtonya/6984339651dd15cd06d6c817a8b320e0 to your computer and use it in GitHub Desktop.
Save hellofromtonya/6984339651dd15cd06d6c817a8b320e0 to your computer and use it in GitHub Desktop.
Customization example for changing the post permalink (i.e. which is displayed when there is no post title)
add_filter( 'genesis_post_permalink', 'genesis_sample_change_post_permalink' );
/**
* Change the post permalink by prefixing with an indicator as to what it is.
*
* @since 1.0.0
*
* @param string $html
*
* @return string
*/
function genesis_sample_change_post_permalink( $html ) {
$html = str_replace( '<a', __( 'Read More:', 'genesis-sample' ) . ' <a', $html );
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment