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?
- How to set custom cookies before output
- How to use wp_insert_user on WordPress Multisite?
- Check if page parent has certain template
- How to loop over custom fields in a page template?
- wp_delete_post deletes all posts instead of just expired ones
- How to sort results from a custom database table
- Strip Image Classes from HTML Output
- admin-ajax.php responding with 0
- Deregister and Dequeue Stylesheets From a Plugin and Enqueue a Child’s Stylesheet/s
- How to use return in my custom function instead of echo
- Validate Uploaded Image using WordPress’ Built-in Functions?
- $wpdb->flush(); breaks the loop
- Proper syntax or method for keeping url in modified isotope / category links
- Gutenberg block – Save PHP function’s output as HTML?
- Which hook/action will help me solve my problem?
- Programmatically inserting post through URL – when including wp-load.php, it’s redirecting to wp-admin/install.php
- curl_exec causes timeout on mod_fcgid
- Accessing WPDB Multidimensional JSON Array w/ Javascript
- Fatal error: Call to a member function query() on a non-object
- Remove dash from blog title wordpress
- Include text in echoed hyperlink
- set post limit at load more ajax wordpress
- Why my loop isn’t working? [closed]
- How to use AJAX to call php page with parameter
- WordPress meta_query >= &
- Change header on pages displaying taxonomy items
- Must filter functions receive all arguments passed to them?
- Prevent Company Name From Translating
- Displaying Slider in Front Page (home) using Customizr Theme
- Usage of var keyword in the core
- Ajax URLs without #!, how to prevent falling into single.php on load or reload?
- PHP displaying wrong custom taxonomy images
- Slow site initial load time
- MySQL Query Returns Array () In Shortcode
- PHP session not staying alive. headers already sent
- how can I call a function when time expire
- Get Child of Child Pages in custom Menu
- Latest posts feed with a specific post always first
- WordPress Post undefined error with Post Date (New to Wordpres Dev)
- Move Jquery.js to Footer
- Attaching an upload to a user
- Change home_url in searchform.php to go to HTTPS instead of HTTP
- can’t grab PHP $_POST variable
- Ajax Load more CPT via shortcode
- Loop 1 user randomly
- Wp_mail doesnt work
- Sort by multiple options in custom field
- Top menu disapears in Category Pages when filtering using ACF
- doubled content
- Adding if statement to content for homepage
- Tables not showing divs and loop/php items
- how to import contacts from php to wordpress
- How to add active class dynamically
- Setting WooCommerce currency programmatically
- I’m not able to get access $wpdb in my php file in wordpress
- Submit cf7 form to cfdb as pdf/BLOB [closed]
- cURL External API request displays content above other content on page
- WordPress online courses system
- Redirect posts to post editor page based on query string
- How do I stylize selected comments?
- Displaying generated HTML within a WordPress site