2017-07-03 119 views

回答

0

你可以在像下面REST API響應摘錄,這是文章的摘錄默認,

示例響應JSON數據,

"excerpt":{ 
     "rendered":"<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n", 
     "protected":false 
     }, 
+0

對不起,我想你誤會了。我知道在JSON響應中找到它的位置。我的問題是,如何從CPT中獲得除JSON對象外的其他內容。 – javapatriot

+1

Rfer這可能會幫助你,https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/ – GNANA

+0

謝謝,我已經閱讀了文檔並且沒有看到添加摘錄的明確方式 – javapatriot

相關問題