I really want to use Page Builder to build my next site. The problem I’m having is I don’t understand how/where I can save re-usable components without having to write _too_ much code (I don’t have a problem with code snippets up to about 20 lines, or with creating templates).
Let’s say I want to use Page Builder to create the masthead on my site, containing a logo and the primary menu area. This does not change, it’s the same on every page. The way I see it, even if you are cloning pages or creating custom templates, you are repeating that change on every existing page. Is that true, and if not, how do I make a change in one place and have it affect all pages?
One thought I had was to build a widget to output the masthead code. That way, you create a “my masthead” widget and put it in the top row of a page. When code needs changing, you change the widget once and it impacts every page including the widget. It seems kind of a headache to write widgets for all the repeatable components, but it would work. My real question is “is there a better way?”
While I’m at it, how would the widget classes created by SiteOrigin play into this? Do they make the job dramatically easier?
Hi Scott
Thanks for reaching out, sorry we weren’t able to reply sooner.
In the case of a masthead, a widget area would be the easiest way to go. You’d add a normal theme widget area to your functions file and then insert a Layout Builder widget into that widget area to work with Page Builder.
For everything else, we can finally show you the Custom Post Type Builder: Page: Custom Post Type Builder. The documentation I wrote in that section needs a round two but hopefully, it gives you some idea of what you can now do with Page Builder and Custom Post Types. The CPT Builder is part of our newly released SiteOrigin Premium offering: Download: SiteOrigin Premium.
Let me know if you have any questions or any documentation suggestions.