Managing Different Excerpt Length for Different Post Types

By default, Excerpt Length is set to 55 words. But, there is a filter hook with a name excerpt_length you can override the default Excerpt Length.

However, there are certain scenarios where you’ll need different excerpt length for different post types used in the WordPress website. So, to overcome this scenario, I’ve prepared a code snippet using the filter excerpt_length which you can easily set your own excerpt length for each of your post types used.

Get instant free access to my monthly developer friendly newsletter where I'll share my best informative tips about WordPress and my Life Experiences.