最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to extract an excerpt from a specific page?

programmeradmin4浏览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?

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?

Share Improve this question asked Apr 10, 2019 at 7:11 KamKam 1
Add a comment  | 

1 Answer 1

Reset to default 0

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

发布评论

评论列表(0)

  1. 暂无评论