[wp-trac] [WordPress Trac] #40765: Not able to get contents after more tag.

WordPress Trac noreply at wordpress.org
Wed Oct 30 18:59:08 UTC 2024


#40765: Not able to get contents after more tag.
-------------------------------+-------------------------
 Reporter:  mukeshbeniwal      |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.7.4
 Severity:  normal             |  Resolution:  worksforme
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+-------------------------

Comment (by thiscantbe):

 When using the WordPress REST API to get a post's full content, consider
 using the _embed or fields parameters. Adding ?_embed to your request, as
 in /wp-json/wp/v2/posts/{id}?_embed, will fetch embedded data that
 includes the full content of the post. Alternatively, specifying fields
 with the fields parameter allows for a more tailored response. For
 instance, by requesting content.rendered, along with other fields like id
 and title, you can directly retrieve the full post content. This approach
 would look like /wp-
 json/wp/v2/posts/{id}?fields=id,title,content.rendered. Using either
 parameter will ensure you access the full post content rather than a brief
 excerpt.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40765#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list