WordPress.org

Ready to get started?Download WordPress

Forums

Change to wp_trim_excerpt() (1 post)

  1. dblume
    Member
    Posted 8 years ago #

    I ported my blog from CityDesk, where I used excerpts with each article. But in WordPress 2.0, excerpts are indistinguishable from short articles. (Fake excerpts can be distinguished because the [...] characters are appended.) So on an archive page, users don't know whether they're looking at a complete short article, or a manual excerpt if there's no [...].

    That's why I had to modify wp_trim_excerpt like so:

    function wp_trim_excerpt($text) {
    global $post;
    if ( '' == $text ) {
    ... (same)
    }
    else
    $text = $text . ' [...]';
    return $text;
    }

    There may be others who migrate to WordPress who find themselves in similar shoes, wishing their excerpts wouldn't look exactly like short articles.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.