Hi there.
I am currently trying to figure out if it is possible to create a post programmatically with wp_insert_post and set the content in such a way that it will show a page builder layout.
I have tried to copy the content from the database and insert that into the post. This does not work however. I then noticed there is also some post_meta data which uses the key “panels_data”. So I have tried to update this data for the post as well, but did not get the result I was looking for.
What I want to achieve:
Create a post with wp_insert_post and set the content with certain data
When I edit the post I want to have the pagebuilder layout active with my data in the rows/elements
If there is any solution to create a post with pagebuilder layout active that would be amazing!
Thanks in advance.
M. Franken
Hi Maarten,
I would recommend using either the Download: SiteOrigin Premium Custom Post Type Builder (which includes templating) or I would enable Page Builder for posts/pages by default – you can do this by navigating to WP AdminSettingsPage Builder and open the General tab, tick Default To Page Builder Interface.
Outside of that, I’d like to help you with this issue but unfortunately, this is beyond the scope of the support we’re able to offer on our free forums. There is a fair amount of custom work involved.
I can offer assistance with this to our premium users, so if you’d like to upgrade to SiteOrigin Premium, then I can help you over email support.
If you’d prefer not to upgrade to SiteOrigin Premium, then you can hire a WordPress developer from Codeable. They’ll charge you an hourly rate for any work done.