Help Needed to Retrieve Page Content Modified with BE Builder via REST API for Python Automation
Hello everyone,
I'm encountering a problem trying to retrieve the content of a page edited with BE Builder using the WordPress REST API as part of an automation project I'm working on with Python. Here are the details of my issue:
I have a page on my WordPress site (Page ID: 2029) that has been edited using BE Builder. I'm attempting to use the WordPress REST API to retrieve the content of this page, but the content
field returned is empty.
I have tried retrieving the page data via the wp-json/wp/v2/pages/{id}?_embed
endpoint. The API response includes the following metadata but does not contain the BE Builder content:
{'id': 2029, 'date': '2024-05-25T16:42:54', ... , 'meta': {'_themeisle_gutenberg_block_has_review': False, 'footnotes': ''}, ...}
I have also checked the metadata and custom fields, but I cannot find where the BE Builder content is stored.
The script works perfectly when creating a page with the WordPress editor. This issue only occurs with pages edited using BE Builder.
My goal is to clone a page edited with BE Builder to change two variable fields that need to communicate with my management system on a LAN server.
Could someone please help me understand how I can retrieve the content of a page edited with BE Builder via the REST API for my Python automation project? Is there a specific custom field I should be looking for, or is there a particular method to access this data?
Additional Information:
- Theme: BeTheme (last version updated)
- Builder: BE Builder
- WordPress Version: (Last version updated)
- API Endpoint used:
wp-json/wp/v2/pages/{id}?_embed
Thank you very much for your help!
Comments
Hi,
Data from BeBuilder is saved in a Custom Post Field named ‘mfn-page-items’. Depending on the save method selected in Theme Options > Advanced, it can be serialized or serialized and base64 encoded.
Further details, you will find on https://stackoverflow.com/questions/43986513/how-do-you-add-custom-fields-defined-in-posts-to-the-rest-api-responses-in-wordp