Quick WordPress tip: replace the default ellipsis in your post excerpts
A really easy way to make your blog home page easier to read is to use <?php the_excerpt() ?> instead of <?php the_content() ?> ( you can find this in index.php). It’s great because instead of displaying the entire contents of each post on your blog home page it displays only an excerpt. The bad news is we get a horrible looking ellipsis (“[...]“) indicating there’s more to read. It’s useful but ugly, so we need to change it. We do that with this code and it needs to go into your functions.php file between the opening and closing PHP tags.
[PHP]function replace_ellipsis($text) {
$return = str_replace(‘[...]‘, ‘…’, $text);
return $return;
}
add_filter(‘get_the_excerpt’, ‘replace_ellipsis’);[/PHP]
The code goes out and finds all of the offending ellipsis and changes them to what we specify between the quotes on line two of our PHP function .
That should be it, if anymore help is needed feel free to contact us.
