How to change the number of words in the post's excerpt? + Hide tags after the excerpt.

  • sghegde87

    #8037

    Hi,

    Been searching for a way to change the number of words in the post’s excerpt. (in the front page). And, is there any options in Graphene to hide the tags after the excerpt?

    I tried adding this code in functions.php. but it didn’t work!!!

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    sghegde87

    #40165
    Quote:
    Hi,

    Been searching for a way to change the number of words in the post’s excerpt. (in the front page). And, is there any options in Graphene to hide the tags after the excerpt?

    I tried adding this code in functions.php. but it didn’t work!!!

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Mod

    Kenneth John Odle

    #40166

    That should work. It it doesn’t, try a different value for 999.

    sghegde87

    #40167

    Yep.. Works if I change it to 100… 🙂 Thank you Ken…

    Marking it resolved.

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

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