• I have a custom theme that requires the <!–more–> tag in all my posts for it to display an excerpt of my post’s content.

    I’ve got over 500 posts already, and its going to take forever to add the tag in all my posts. I don’t want to use a plugin.

    I just need a snippet i can use that will add this effect to all posts i currently have and create in the future.

    I’ve been searching Google and i discovered this

    function custom_excerpt_length( $length ) {
    return 20; // You can change the number here as per your need.
    }
    add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

    Will this work?

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to add More Tag to every single post at once’ is closed to new replies.