If you’ve ever needed to add excerpts to pages in WordPress 3.0+, you can be happy because the tip is very simple. Just add the following code to a file that wordpress loads automatically.
| |
Usually the code above is placed in an “init” action hook.
This will enable a new field in the administration panel, letting you add an excerpt to your pages.
In the case above, we’re adding the “excerpt” functionality to the “page” post type.
Visit the official WordPress Documentation and also the official documentation for this function for more details.