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

Ability to disable post editor and other metaboxes when "Page Builder Only" page template is used #43

Open gregrickaby opened 8 years ago

gregrickaby commented 8 years ago

When we use the "Page Builder Only" page template, we don't need to have the post editor metabox on the screen. It's confusing and creates clutter.

If we're going to disable that, let's look into disabling other metaboxes too (Yoast, Featured Image, Comments, etc... )

(Featured image is great, but I'd rather a client add an image via Page Builder field, than try to explain why they need use a one-off metabox to the right)

modemlooper commented 8 years ago

can do it

gregrickaby commented 8 years ago

Maybe we can follow what register_post_type() does?

$args = array( 'supports' => array( 'editor', 'thumbnail', 'etc....' ) );
blobaugh commented 8 years ago

Should we really remove non-core metaboxes such at Yoast? Those are probably fine to leave as they are purposefully added when installing plugins

gregrickaby commented 8 years ago

@blobaugh Maybe we can set Yoast priority to "low" so it goes below our Page Builder metabox? I feel like we do this on every project anyway...

jtsternberg commented 8 years ago

I just did this on a project today. It requires setting hookup to false and hooking in manually (and then remove/add_action-ing to change the hook priority). Agree with Ben, shouldn't remove all.

jtsternberg commented 8 years ago

Like this: http://b.ustin.co/pz5C

modemlooper commented 8 years ago

here's how you do it per custom page template https://gist.github.com/modemlooper/fe83273ce5458ae5adfe

is the page builder template a wp page template or a SPB template part?

jazzsequence commented 8 years ago

I like this idea a lot, and I think it should be something that gets added to Page Builder. We need to be careful not to assume it's an always-on setting though, e.g. if you're using a "page builder only" template, that doesn't necessarily mean you will always want to hide the post box and various meta boxes. It needs to be something that can be toggled -- ideally in the code rather than an actual, visible option -- rather than something that works automagically. Maybe a new option value passed to wds_register_page_builder_options could handle it?

Also not sure that it's necessarily something that's always-on or always-off. Some "page builder only" pages might not need or want the post box, but others might. In that case, somehow doing something along the idea of #44 and make it conditional might be better.

At any rate, we need to tread carefully with this feature because there's a lot of use cases where it would no longer be a feature but end up being a :beetle:.

blobaugh commented 8 years ago

Ladybugs are cool

modemlooper commented 8 years ago

Disney world employees millions of Ladybugs as they are a natural pesticide, eat lots of mosquitos

jazzsequence commented 8 years ago

...I think you guys are missing the point. ಠ_ಠ