WordPress REST API – JSON “Rendered” Content Incorrect

i’m working in android application that use wordpress rest api to get blog from website to , i don’t have any knowledge about php or wordpress , but i take some time to learn about it , any way my problem is on the json .the content contain paragraphs unknown and i don’t know how to solve this problem ,please help
android application
json
youtube video

3 Answers
3

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);

Leave a Comment