Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hey everyone,
Does anyone know how to make a pre-built layout for Pagebuilder in a WordPress Theme?
Or a tutorial or something who explains it.
Greets,
Joren
Hi Joren
Please find our documentation on this topic here:
https://siteorigin.com/docs/page-builder/bundling-prebuilt/
hope that helps.
Yeah I had seen that already, but I don’t understand the documentation.
Can you explain it?
I can try but I’d need some more info. Where are you losing track of the instructions?
In which file do you need to put the function?
And what must be in the arrays?
Hi Joren
At the moment, prebuilt layouts are something a theme would be adding itself. It’s really up to developers to add it. All the details are in that documentation page, but you’ll need to have a fairly solid understanding of PHP and WordPress theme development. Are you developing a theme or do you just want prebuilt layouts for your site?
If you’re just interested in creating a few pages with a similar layout, then cloning pages is the best solution.
Yes I have a good understanding of PHP and WordPress.
I want to make a theme for ThemeForest, and I thought that a page builder would be necessary.
But I think that I have to put the function in functions.php?
But I think that is weard, because I looked in the functions.php of the Vantage theme and I didn’t saw a function for Pagebuilder Pre built layout.
You can put the array for the prebuilt layout anywhere, as long as it’s referenced by your theme’s functions.php.
In the case of Vantage, everything is in inc/panels.php (which is included in functions.php). That’s a good example of how to add prebuilt layouts to your theme.
To get the array for a layout, you need to enable SITEORIGIN_PANELS_DEV in your wp-config.php. There are instructions for this in the docs Andrew linked. Just create a page using page builder, save it, then view the HTML source and search for “Page Builder Data”. There will be a full PHP array in your HTML that you can just copy paste into your prebuilt layouts filter. You’ll just need to add a ‘name’ attribute to the array.
Feel free to ask any questions if this is still not clear. It’ll help us improve our docs :)
Heey,
On this moment, I have a problem.
I enabled the dev mode in my wp-config.php, but in the html source the page builder data is not showing.
Do you know how to fix this? It is on http://www.reddle.nl/new
Hi Joren
I’m not entirely sure why it’s not showing up. We’re introducing file based import/export in the next update of Page Builder, so this will be a much simpler solution to adding and distributing prebuilt layouts. Maybe you’ll have more luck with this option :)
We’re about to go into the testing phase. We’re hoping to release this update next week.