Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any plugin to automatically add tag when the post is longer than say 10 lines? I want to trim the post in the homepage but do not want to add more tags for all the post one by one.

share|improve this question
this is a shopping question, plugin recommendations are beyond the scope of this site – Tom J Nowell Jan 17 at 11:35

closed as off topic by anu, Michael, Tom J Nowell, toscho Jan 17 at 14:17

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

Use the_excerpt() function.

By default, excerpt length is set to 55 words. To change excerpt length using excerpt_length filter, add the following code to functions.php file in your theme:

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

You can add more link like this after the excerpt .

<a href="<?php get_permalink() ?>">Read more...</a>
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.