How can I shorten the length of text that shows in the post excerpts?

  • TAC

    #2962

    Hello all,

    I want to try and limit the amount of text in the post excerpts that show on the home page. I tried the ‘more’ tag in the posts but nothing changed.

    I also tried a forum search but all related questions seemed to be about the slider and I am not using that.

    Thank you in advance for any help 🙂

    Anonymous

    #22880

    Custom excerpt length function. (This goes in your child theme’s functions.php file)

    <?php
    add_filter('excerpt_length', 'custom_excerpt_length');
    function custom_excerpt_length($length) {
    return 20; // Change this to whatever you want.
    }
    ?>

    Or try this plugin – http://wordpress.org/extend/plugins/excerpt-length/

    or this one – http://wordpress.org/extend/plugins/advanced-excerpt/

    ABasketballJones

    #22881

    The ‘Advanced Excerpt’ plugin worked a treat.

    Thanks

    TAC

    #22882

    Thank you Prasanna for your great reply. I tried the code but wasn’t too sure where to put it so went with the ‘Advanced Excerpt’ plugin as well and all works just as I wanted.

    Thanks again 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.