This is expected, as it depends on the context.
The raw content will show up for the edit but not the view or embed context.
It’s filtered through the WP_REST_Controller::filter_response_by_context() method.
You can always add a new field to the response with register_rest_field() where the get_callback callback receives an input array with post data, including the raw content.
But then you should watch out to not leak out e.g. password protected posts or content hidden with shortcodes.
Related Posts:
- WP-API v2 Custom Endpoint Response Formatting
- Creating a post with the REST API, curl and oauth returning 401 error
- Does the REST API (official) support custom post types?
- Show different Customizer Settings on Page-Tamplates
- how to decode % in app [closed]
- Difference between ‘type’ => ‘text’ and WP_Customize_Control
- Shortcode API: How to get name that matched shortcode RegEx?
- woocommerce registration form with klaviyo(don’t work with current user)
- Change the CSS of the Customizer API
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- Fetch post block/field data as JSON with WordPress API
- Woocommerce api: create product with images – bad request
- How do I start using an external API and PHP for a WordPress.org page?
- Store a default value for a transient on plugin activation
- PHP > Scheduled Tasks > Sending daily email with dynamic API variables
- Fetching instagram api not working on wordpress
- How can I call specific function if requested URL is not found?
- Building a REST API for your web app exposes primary keys of DB records?
- How to set a template with wp_insert_post
- Is it possible to create new user from external form using REST API?
- How to clone all WordPress Rest API end points
- Export post data with xml to other site using php soap
- Generate images with html2canvas and the woocommerce api
- Creating a brand attribute as a variable
- Create a WordPress Contact Form to call a POST AWS API Gateway and send user data
- How do i post data to url with fields?
- Trouble Accessing Gravity Forms API (GFAPI)
- $_GET[‘title’] in WordPress
- How do I create a WP endpoint that retrieves all custom post types that have a tag?
- Pulling Products from an API
- WP HTTP API call response
- AdWords API with WP
- Run A Pre-Built Core PHP Application Under A WordPress Page or Post Route
- base64_encode conflict with convert_smilies in wordpress
- get_body_params() is always empty in POST request
- Create custom API endpoint to change custom header image
- Why is this specific API request failing when sending via wp_remote_post?
- How to cut a section of a URL from a string with a regular expression?
- Adding Microsoft Teams Incoming Webhook to WordPress, Problem with Rest Route?
- wordpress-plugin (widget) that performs a Neaby-search on the openstreetmap-endpoint: around x find y
- REST API Plugin Update call back not updating the plugin
- Display endpoint’s return into a file (file_put_contents())
- Read data from external source. XML vs REST API
- Can’t make an external api call in php side of wordpress child theme
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Undefined function mysql_connect()
- MySQL column count doesn’t match value count at row 1 [closed]
- Check if post of title already exists
- Static Frontpage Pagination – Custom loop
- Check if user already visited this post today
- wp_signon always passed the password eventhough password is wrong
- Removing jQuery migrate and working with dependencies
- How to get the registered sidebar’s name by its id?
- external wordpress pages using wp-blog-header
- Why WordPress uses 4 tables to manage terms
- How do I enable HTML5 prefetching on this page?
- user_id error: Only variables should be passed by reference
- How can I add pagination and how can I change thumbnail size?
- Call External Object in Class Function During Callback
- Why do WordPress rewriites seem to work differently for posts vs pages?
- Performance impact of rewriting WordPress URLs
- Mute Debug Messages from Plugins
- wp_ob_end_flush_all and wp_suspend_cache_addition()
- edit_comment_link is not showing for comment author
- Css loads very slow [closed]
- Why is image hard cropping for one image using add_image_size not working?
- database sent to a JSON file
- How do I get around “Sorry, this file type is not permitted for security reasons”?
- If has $title in widgets
- get href content [closed]
- Displaying text if post was within 5 hours
- Change “No Comments” link to “My String” on Blog Post (Find Snippet in Code or use CSS, PHP Solution) [closed]
- How to say if meta_value is greater than 0 in an array?
- Adding a tag_ID column into Categories inside the admin dashboard?
- Best Way to Change a String in a WordPress Post
- Show get_sub_field value if it exists [closed]
- How to wrap every 3 posts in a div (and close the last div too) [closed]
- Dividing the loop to style post differently
- How to Display a List of Child Pages For a Parent Page in WordPress
- User meta needed in query is serialized – how to unserialize safely?
- PHP calling AJAX function that relies on passed PHP function values not working
- Order by title Child Pages displayed in a Parent Page
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- Intermittent problem can the debug log give any clues?
- Echo short code syntax
- Decoding an array in PHP (from the Shopify API) [closed]
- PHP is_embed error showing up
- How fix error in the WordPress loop?
- PHP Session Variable to WordPress Error
- Run code before WordPress loads and insert data into WP if need be
- Sorting Meta Fields?
- Themes with variable width or single columns? I want to display source code
- Category List in Theme Options Page
- upload images on front by user using form
- understanding wp_next_scheduled
- WordPress 6.1.1 UTF8 Slug Limit Increase
- WordPress directories not writable after PHP version upgrade
- How do I unset category from a product in wordpress by code
- add_rewrite_rule image from /images/site2/favicon.ico to /favico.ico
- Load style and script for custom post type metabox