AgentWP

  • Tutorials
  • Themes
  • Plugins
  • Services
  • Contact

Add Excerpts Support for WordPress Pages

WordPress supports excerpts for Posts by default. But what to do if you need excerpts for pages as well? Its very easy to add excerpts support for WordPress pages. Just add the following code to your themes’ functions.php file,

function page_excerpts_agentwp() {
add_post_type_support('page', array('excerpt'));
}

add_action('init', 'page_excerpts_agentwp');

That’s it. Now you should see the excerpts box for pages also.

Get useful WordPress related tricks, tips, tutorials and reviews delivered straight to your inbox.

StudioPress - Premium Wordpress Themes
ElegantThemes - Premium Wordpress Themes

Copyright © 2023 · AGENTWP · All Rights Reserved

Copyright © 2023 · awp on Genesis Framework · WordPress · Log in