0

Is there a way to extract an excerpt from a specific page? I've created a child theme and enabled excerpts on the pages. I know how to extract all excerpts for pages... but is there a way to extract only from a specific page or range of pages?

1 Answer 1

0

you need to use get_the_excerpt https://codex.wordpress.org/Function_Reference/get_the_excerpt Where the argument can be the page id or the post object you want to get the excerpt from.

2
  • ...if, as an example, the page id is 5... how would I change the argument to point to that page?
    – Kam
    Apr 10, 2019 at 9:18
  • get_the_excerpt(5); Apr 11, 2019 at 10:02

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.