wordpress_the_excerpt

How to enable excerpts for pages

on March 17, 2011 | 2,186 views

This is an old trick, but in case you missed it i am re-publishing it. This is a really simple thing to do. Just follow these steps.

1. Open functions.php in your theme editor.

2. Add this line where you find appropriate:

add_post_type_support( 'page', 'excerpt' ); // Enable excerpts for pages.

3. Save your file.

In a default wordpress theme pages are only listed on search pages. In order to use excerpts, you need to convert the_content calls to the_excerpt in your appropriate template (search.php if exists).

Cheers.

ADVERTISEMENT
ADVERTISEMENT

About Shailan.com Staff

Shailan.com is a design blog about WordPress and web design. We regularly write about wordpress, plugins, themes, web design resources, php, css, jquery, adsense and more.. If you want to get notified about our posts, be sure to subscribe to our feed or follow us on facebook.

Share Your Thoughts

Your email address will not be published.