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
- Encountering 400 Bad Request Error When Sending Form Information to API through Elementor
- Can external API content be added to Rest API in WordPress
- How to pass a file to an API call through WordPress
- Can’t make an external api call in php side of wordpress child theme
- WordPress Custom API GET request from External App with XML Parameter
- Different Subdomain changes page content
- Theme not calling Jquery properly
- customize wordpress database error page
- Removing the comment function within wordpress
- Creating Database Table vs. Adding MetaData to Post & User
- Post’s ID pattern?
- Countdown to date function?
- Include text in echoed hyperlink
- How to put a form with php code into a variable or shortcode?
- Utilize Function in Child Theme / Template File
- Add class to DIV depending on page loaded
- Need oop for wordpress theme? [duplicate]
- Display Youtube Time Automate from Key
- Content filter won’t work
- How to retrive the text : No movie by this actor
- Make a database query using WordPress
- Is the 404 page automatically displayed if a loop returns nothing?
- update_post_meta only updating on last loop of foreach
- How to have different header.php based on the user logged in?
- How do I remove a category from a wordpress loop>
- How can i count the post added in relationship field, theme display
- Link blogname and blogdescription to the Options Framework
- Liking a facebook page from wordpress website?
- Isotope Drop Down Categories Filter Function
- First Byte Time (back-end processing)
- How do I define a lookup table that will work across all PHP elements of the template?
- How to keep track of when a vote is cast?
- trouble with page_id & highlighting current page
- Convert the_permalink() function output into string
- Making my first wordpress template
- How to use array in function to get only value I want
- Apply class to every third list item? [duplicate]
- Only show image from custom field when present
- Cinema site, retrive the movies that actor play in
- How to include custom code on a page that’s set to act as homepage?
- retain querystring values when savincustom options in admin
- PHP if statement works in template files, but not header
- How Can I Edit the Registration Code?
- Error while setting role
- Editing a PHP file to include a small text piece on every page
- Get categories names as an array to use it in theme settings
- Should i use the wordpress Options table or to create database table..?
- variable value disappears in a second loop
- Force Users To Relogin
- unknown issue in ‘header.php’ preventing theme from displaying fully
- Hide a div to subscribers(user role) in one page (is_page)
- Security updates to 3.3.2
- Where is this function’s callback getting its arguments from?
- How can I use a sliced image As banner? [closed]
- persist a variable set in header.php all the way down to footer.php
- Echo title attribute php
- Can a page contain php code?