custom_excerpt

  • raoz

    #48441

    function custom_excerpt_length( $length ) {
    return 20;
    —————————-
    Is it possible to shorten the text summaries with a function that works? The above code did not work in the new theme.

    Admin

    Syahir Hakim

    #48457

    Try this:

    function custom_excerpt_length( $length ) {
       return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 20 );
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.