[wp-trac] [WordPress Trac] #40765: Not able to get contents after more tag.
WordPress Trac
noreply at wordpress.org
Wed Oct 30 18:58:38 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):
To obtain the full content of a WordPress post using the REST API, you
have two options. First, you can add ?_embed to the end of your request
URL, which prompts WordPress to include all embedded data, such as the
complete post content. For example, /wp-json/wp/v2/posts/{id}?_embed will
return the entire post along with additional details. Alternatively, you
can use the fields parameter to specify only the data fields you need. By
including content.rendered, you’ll receive the full post content. This
request would look like /wp-
json/wp/v2/posts/{id}?fields=id,title,content.rendered. Both methods are
effective ways to retrieve the complete content instead of just a summary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40765#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list