I am creating a simple wordpress theme and need excerpts for pages. I have tried the code from many topics some resolved on 'wordpress SO' but nothing works.

Because I created the theme from scratch I added a blank functions.php file and put the following code in it.

add_action( 'init', 'my_add_excerpts_to_pages' );
function my_add_excerpts_to_pages() {
    add_post_type_support( 'page', 'excerpt' );

Nothing comes up so far, but no errors either. Am I doing something wrong? Do i need to register the functions.php file? Any help would be great.

Should add that this is on XAMPP as I am doing everything locally at the moment.

  • Just tried changing the admin favicon using a different method and it worked. So not sure what the problem is, I have tried the code from all the resolved questions on here and even a lot of tutorials to add excerpts but nothing works...
    – SharpCode
    Feb 27, 2015 at 4:28

1 Answer 1


Ok this was a rather simple answer. It appears that once you add the code you have to expand the screen options and enable it in the actual admin view.

This link is what helped me add_post_type_support().

  • Or add this in your "after_theme_setup" in functions.php add_post_type_support( 'page', 'excerpt' );
    – decoder88
    Sep 17, 2018 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.