0

I'd like to modify the editor by adding some 'layout' buttons. Ideally, I'd like to add the ability to add some html 'partial' by simply clicking a button. This is to help my client to create pre-coded pieces of page by himself, since he can't code html markup.

So, I would pre-program some micro-templates and then add a button for each one, or a select..

Can you suggest me some good ways to start with?

1

You could do this with custom shortcodes or in some plugins with saved layouts. Many pagebuilder give the option to save predefined layouts.

Try out this plugin if you want to create the predefined layouts programmatically.

  • Hi, thank you. Neither are what I'm searching for, though. I'm a developer, so no problem with code. I want my client to be able to insert a piece of layout by simply click a button. Right in the editor. To clarify, something like this, but triggered by custom editor's buttons: https://www.smashingmagazine.com/2011/10/advanced-layout-templates-in-wordpress-content-editor/ – Luca Reghellin May 20 '16 at 13:07
  • The method in the linked post will not work with any input in the page editor as the filter used only fires when the post is created. So I think there is no way to modify the editor screen on the run. I think you could achieve want you want with any drag and drop pagebuilder or with the plugin linked in my answer to limit the user inputs to custom fields of predefined templates. – Jekyll May 20 '16 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.