WordPress.org

Support

Support » How-To and Troubleshooting » Can't Add Read More link to Excerpts

Can't Add Read More link to Excerpts

  • Hi,
    My theme includes this in functions.php:

    # Removes tags and trailing dots from excerpt
    function dp_clean($excerpt, $substr=0) {
    $string = strip_tags(str_replace(‘[…]’, ‘…’, $excerpt));
    if ($substr>0) {
    $string = substr($string, 0, $substr);
    }
    return $string;

    I don’t understand this code, but it leaves this on my webpage in my excerpts as my read more:

    […] (with no link)

    I don’t want that, I just want a read more link. I’ve tried removing the above code from my functions.php and replacing it with what codex is telling me to use on this page:
    http://codex.wordpress.org/Customizing_the_Read_More

    but nothing is working. Do I have to leave this code there and add something else? Do I have to modify this code in order for it to show a link? Someone help. Not sure even what this code means like I said. Thanks a lot.

  • The topic ‘Can't Add Read More link to Excerpts’ is closed to new replies.