Add Language and Translations to the REST API (WPML)
Adds wpml_language and wpml_translations fields to posts and pages in the REST API, so headless front ends and apps know each item's language and the IDs of its translations.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Adds wpml_language and wpml_translations fields to posts and pages in the REST API, so headless front ends and apps know each item's language and the IDs of its translations.
Adds an author_details field with the author's display name, profile link and avatar URL to every post in the REST API, saving apps a second request or a heavy _embed call.
Stores the responses of public GET requests to the REST API (such as post lists used by headless front ends and block widgets) for a few minutes for logged-out visitors, and clears the cache when content changes.
Adds a "term_names" field to REST API responses for posts and custom post types, so apps get category and tag names without extra requests.
Turns on REST API support for post types registered without it, which also switches them to the block editor and makes them available to apps and headless sites.
Registers a read-only endpoint at /wp-json/wpide/v1/latest that returns your latest posts in a compact format, as a starting point for your own API routes.
Adds an "acf_fields" property with the ACF fields you list to the REST API responses of chosen post types, for headless front ends and apps.
Adds a featured_image_url field to posts and pages in REST API responses, so headless front ends do not need a second request.
Lets REST API requests filter posts by custom fields you allow, e.g. /wp-json/wp/v2/posts?meta_key=location&meta_value=paris, for apps and headless front ends.
Adds a public /wp-json/site/v1/image-sizes endpoint listing every registered image size with its width, height and crop setting, so headless front ends can pick the right size for each layout.
Replaces WordPress's permissive cross-origin (CORS) headers with an allow-list, so only the browser apps you name, such as a headless front end, can call the REST API with credentials.
Adds a public /wp-json/site/v1/menu/{location} endpoint that returns the menu assigned to a theme location as a nested list, ready for a headless or app front end.
Adds pll_language and pll_translations fields to posts and pages in the REST API, which Polylang's free version does not provide, so headless sites and apps can link translations.
Adds a navigation field to single posts in the REST API with the ID, title and link of the previous and next posts, so apps can build "read next" buttons.
Adds a "REST" link to the front-end admin bar for administrators that opens the JSON for the post, page, term or author being viewed, which speeds up headless and integration work.
Lets REST API requests for posts and pages ask for more than 100 items at once, useful for exports and static site generators.
Publishes selected fields from your ACF options pages at /wp-json/wpide/v1/site-options, so a headless front end or app can load site-wide settings.
Adds a public /wp-json/site/v1/identity endpoint with the site name, tagline, logo, site icon, language and home URL, so headless front ends and apps can brand themselves from WordPress.
Adds word_count and reading_time fields to posts in the REST API, so headless front ends and apps can show "5 min read" without counting words themselves.