Return to Support

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

Home Forums Graphene WordPress theme Support How can I shorten the length of text that shows in the post excerpts?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2962
    TAC
    Member

    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 🙂

    #22880
    Prasanna SP
    Member

    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/

    #22881

    The ‘Advanced Excerpt’ plugin worked a treat.

    Thanks

    #22882
    TAC
    Member

    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.