wpe_excerpt();

Allows you use a custom excerpt length.

Usage

The function echoes out the post or page content and cuts off at your specified length.

The function supports the following options:

  • wpe_excerpt(50); This will display the first 50 characters.
  • wpe_excerpt(50, 'Read more'); This will display a ‘Read more’ link after the cut off.
  • wpe_excerpt(50, 'Read more', false); This will remove the hyperlink from ‘Read more’.
  • wpe_excerpt(50, 'Read more', false, 123); This will show the excerpt of post ID 123.
  • wpe_excerpt(50, 'Read more', false, 123, false); This will return the excerpt instead of echo.