Always check the Codex first. See this, from the entry for the_excerpt().
You need to use the excerpt_more filter. For example, to completely remove the “[…]”:
function new_excerpt_more($more) {
return '';
}
add_filter('excerpt_more', 'new_excerpt_more');
Thread Starter
zeaks
(@zeaks)
Thanks, but it didn’t seem to do anything
Where did you put that code?
Just to test, try this:
function new_excerpt_more($more) {
return 'Can you hear me now?';
}
add_filter('excerpt_more', 'new_excerpt_more');
Thread Starter
zeaks
(@zeaks)
No change with that. I’m not sure if this matters, but I did change the continue reading link
Here is my functions file
http://wordpress.pastebin.com/q55EDZnd
I don’t see the excerpt_more filter anywhere in your functions.php file?
Thread Starter
zeaks
(@zeaks)
It’s in my current one, here it is with the code in it http://wordpress.pastebin.com/XyfJaDBG
First thing to try: comment-out the gettext filter, to determine if it is potentially interfering with the excerpt_more filter?
Thread Starter
zeaks
(@zeaks)
I commented out add_filter('gettext', array('Twentyten_Child_Text_Wrangler', 'reading_more'), 10, 4); it’s still showing the … though
Thread Starter
zeaks
(@zeaks)
I tried that code above into a new child theme with just that in the functions and it doesn’t remove the … part
Maybe try wrapping the add_filter call in an add_action( after_setup_theme… hook, as you have with your change_excerpt_length() function?
function change_excerpt_more(){
function new_excerpt_more($more) {
return 'Can you hear me now?';
}
add_filter('excerpt_more', 'new_excerpt_more');
}
add_action( 'after_setup_theme', 'change_excerpt_more' );
Thread Starter
zeaks
(@zeaks)
hmm, well that removes it, but it’s also removed the text part of it. Thanks for all the help btw
What “text part”? It should only be removing the default “[…]”.