Home Articles Customize the ellipsis in your trackbacks

Customize the ellipsis in your trackbacks

459
4
SHARE

You may have noticed that WordPress adds a “[…]” before and after every trackback text. I believe this to be kind of ugly, so I came up with a solution to replace them for something else.

My solution consists of adding this function to your functions.php file:


What this function does is, it searches for “[…]” and replaces it for just the ellipsis “…”.

If you wanted to just get rid of the whole thing altogether you would replace the ‘return str_replace…’ line with:

return str_replace("[...]", "", $comment);

If you don’t feel comfortable with code you can also download the plug-in:

Prettier Trackbacks

That’s it for the first tip, hope you enjoyed it.

P.S: By the way… this will also replace any “[…]” in regular comments. But it is very unlikely that anyone will write that in a comment.

4 COMMENTS

Comments are closed.