WordPress.org

Ready to get started?Download WordPress

Forums

Edit the excerpt in wordpress.. (2 posts)

  1. sithicus
    Member
    Posted 8 years ago #

    If I wanted to edit how the actual excerpt is outputted in wordpress.. not the template but the actual html tags the are included.. what core file would I find this in.. (I am not talking about the theme file but the actual wordpress file).

  2. CounterDax
    Member
    Posted 8 years ago #

    MAKE BACKUPS FIRST:

    /wp-includes/functions-formatting.php
    Locate:

    if (count($words) > $excerpt_length) {
    array_pop($words);
    array_push($words, '[...]');
    $text = implode(' ', $words);
    }

    Change:

    if (count($words) > $excerpt_length) {
    array_pop($words);
    array_push($words, '... <a href="' . get_permalink() . '">more</a>&raquo;');
    $text = implode(' ', $words);
    }

    the '[...]' party -- in this example changed to the '... <a href="' . get_permalink() . '">more</a>&raquo;' part -- is the part you will need to modify to what you would like it to say.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags