WordPress excerpt is an optional summary or short description of the post. You can use post excerpt to display post summary on archive pages and search page. You can use the_excerpt(); to display post excerpt. You might want to display post excerpt of different length for different post types based on the layout of displaying posts. You can use the function as below to define different post excerpt length for different post types.