WebDevStudios / WDS-Simple-Page-Builder

Uses existing template parts in the currently-active theme to build a customized page with rearrangeable elements.
GNU General Public License v2.0
136 stars 25 forks source link

A way to create saved layouts without need for database #62

Closed ajgagnon closed 8 years ago

ajgagnon commented 8 years ago

Just wondering since the register_page_builder_layout function is deprecated, is there any other way to create default layouts without creating custom post types? Ideally, default layouts would come loaded with the theme and not be dependent on each site's database.

Thanks again for an awesome plugin!

jazzsequence commented 8 years ago

It's deprecated for now, but we could try to bring it back at a later date. Basically, register_page_builder_layout would need to check if a layout CPT with that name exists and create your layout CPT for you if it doesn't using wp_insert_post and then add the post meta for the template parts. If you want to try submitting a PR for the purpose, I'd be happy to give it a look. :)