The problem I’m having is that the_excerpt() isn’t returning the content from the post’s “Excerpt” field. Instead, it’s returning the first part of the post, as though the “Excerpt” field was empty.
My code is very simple – inside the loop, I have …
if(has_excerpt()) {
the_excerpt();
} else {
the_content();
}
Is there something that needs to be done to tell wordpress to use the “Excerpt” field.
Thanks in advance for your help.
I resolved this as follows ..
I discovered that the excerpt is stored in the WP_Post class field post_excerpt, so I got it directly with …
I would be happy to hear from anyone if there is a better way, and also why the_excerpt() doesn’t give that field content.
Thanks for your replies