How to change the default word length of summary of the function the_excerpt() in WordPress

The WordPress summary function the_excerpt() default display number of words can be modified as the following:

function custom_excerpt_length( $length ) {
return 200;//200 Is the number of words you want to display
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 );

Related Article
How to add user defined upload avatar function in WordPress

Friends who use WordPress to build a website should know that WordPress itself does not have the function of uploading Read more

How to get the number of articles and comments of the current logined user in WordPress

When developing WordPress Theme user center, I want to get the number of articles and comments of current logged in Read more

WordPress tips: get statistics of the number of pictures in the article

As far as I know, WordPress has no function to count the number of pictures in the article, so to Read more

WordPress details optimization to automatically add ALT and title information to the article image

Friends who know a little bit about SEO optimization should understand that image ALT and image title optimization are very Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image