Last active
December 26, 2015 13:39
-
-
Save guillermorangel/7160368 to your computer and use it in GitHub Desktop.
replace ellipsis on excerpt
http://codex.wordpress.org/Function_Reference/the_excerpt#Make_the_.22read_more.22_link_to_the_post
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 | |
function custom_excerpt_length( $length ) { | |
return 120; | |
} add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); | |
function new_excerpt_more( $more ) { | |
return ' <a class="read-more" href="' . get_permalink( get_the_ID() ) . '">' . __( 'Read More', 'your-text-domain' ) . '</a>'; | |
} | |
add_filter( 'excerpt_more', 'new_excerpt_more' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment