How to display a nice “[... read more]” message

If you use the standard WorPress distribution, then after the excerpt you see something like this: [...]
There is no link inside the … and there is no “more” word.

I want to change [...] into a clickable [... read more], which will lead to the actual post.

In the /wp-includes/formatting.php file, search for [...] (should be around line 860.
Replace the default line:
array_push($words, ‘[...]‘);
with:
array_push($words, ‘<a href=”‘ . get_permalink() . ‘”>[... read more]</a>’);

Save the file, upload it and you’re done.

Leave a Reply

You must be logged in to post a comment.