WordPress REST API – JSON “Rendered” Content Incorrect
The content that you are referring to is coming from the Elegant Themes Page Builder plugin on that site.
The page builder uses WordPress Shortcodes to render the content on the WordPress site. However, when you use the REST API, the content is pulled from the WordPress database and the shortcodes are not processed/rendered first.
You would need to remove the shortcodes from the returned JSON before it is displayed in your app. You could use something like this to remove the shortcodes before displaying your content in the app:
// Remove Divi/ET Page Builder shortcodes
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
Related Posts:
- How to make search and replace in content through php
- Is there a way to show only the text editor
- preg_replace style attr in $content and Editing post_content before saving
- Retrieve content of page by URL Parameter
- WP Rest API: details of latest post including featured media url in one request?
- Best practices for localizing WordPress content?
- if the post has content
- Building a custom REST API
- I want to have my custom field use HTML, how do I do that?
- WP REST API only returning partial list of users
- WP JSON REST API (Ryan McCue) how to query posts with specific meta data with ‘AND’ relation?
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- What’s the Best Way to Structure a Multi-Content Blog?
- How to Handle Distributed Development Workflow
- Get Image URL instead of Attachment Id in Rest API
- How do I create a user using the new JSON api in 4.7?
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Recommended Books on WordPress for Management and non-Developers?
- Total word count for posts by one author
- WP Rest API v2 filter and display latest post with specific tag
- WordPress Rest API: How do we validate with our custom API key?
- Include custom post meta value in fetched JSON
- How to loop through JSON data in wordpress WP REST API
- Split content into multiple columns using more tag?
- Get Content From Blog Page
- Show content after the first and second paragraph
- WP Rest API v2 return posts with specific tag
- Host wp-content on other domain, much like a CDN
- authentication issue with rest api – rest_cannot_create
- How do I make certain areas editable?
- wordpress wp-json prefix issue
- How to: Rest endpoint returning empty object
- What server settings are required to import WordPress XML file
- JSON not valid after json_encode posts
- append_content help
- How to limit post content and remove image caption from it
- Is there a way to trigger an automatic import of a WP backup on creation of a new WP multisite site?
- Filter post_content before loading in Gutenberg editor
- Create a new user using WP REST API and declare meta object
- WP REST API – Retrieve content from page
- Site content not showing
- How to just show first line of content
- Hiding posts and pages in panel
- Take excerpt of the content of the post and send it as the title to create new post
- Android authentication
- WP REST API route request explain
- Implementing the wp json-rest api
- How Do I Add User Custom Field to REST API Response?
- Add Category Name to REST API
- Convert all youtube link to embed
- Disable REST API for a user ROLE
- Display sub-taxonomies based on SELECTED parent-taxonomy
- Change Content for Specific Page
- ping_status in JSON REST API
- WordPress JSON API returns normal site page in html. How do I get it to give me JSON?
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- Get all post media images via WP REST API
- Can’t GET draft posts via REST API from headless frontend
- Increase the page size of the WordPress REST API
- Recommended way to remove WP REST API returned data for custom post
- Formating content rendered from wordpress REST API as JSON and not HTML
- Options to get my custom post type metadata via the WordPress API
- Create multiple posts with WP REST API at once
- Passing Meta array in wp-rest api
- Keep user’s privileges on accessing contents in JSON response
- wp_insert_post iframe missing
- Grabbing specific content
- Inserting custom post meta value using WP-REST API
- Does is_user_logged_in() block search bots?
- Replace full content with an excerpt
- WordPress REST API – Modify JSON before importing
- How can I cache WordPress Rest API Response
- WP REST API format response
- Output string using php printf
- content gets scrambled
- Conflicting post edit options under dashboard
- Why does AWStats show /wp-json* as Viewed URLs
- Output JSON object with woocommerce products
- Disable external (3rd party) CALL (images,fonts..) in Dashboard
- Why aren’t tags and categories added in post request to WP Rest API
- Hook before posting via JSON REST API
- Retrieve a specific number of words from post_Content
- Get the content inside shortcode and apply external function to it?
- Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?
- How to order WordPress Rest API data
- REST : how do you handle the rest_no_route error?
- WP Rest API – How to convert embedded to json object in Java [closed]
- featured image not found in json from wp rest api
- How to have a “clean” post content, for excerpt and social networks sharing
- Hide specific content from excerpts
- WordPress REST API not returning all posts
- How to make author box like this & add after every post?
- Querying A Post That Includes Two Taxonomies Using JSON Rest API
- Hardening wordpress: wp-content file permissions?
- Extract an embedded video from the content
- same wordpress, 2 domains
- Displaying latest Posts – fixed height – Excerpt vs. Content?
- How to create a post using REST API with sending data as a JSON body?
- How to filter post content and force every link () made in blocks to return urldecode() with readable value?
- Custom endpoint to get all custom taxonomy terms