In this post, I will explain: So, the basic idea is to register “Page Builder” page template, and use it to toggle/switch between Visual Editor and Page Builder when user change the page template. To follow this tutorial easier, you can download the source code: Register Page Template From Plugin To make this plugin not theme dependent, we need to register page template without creating it in theme. It’s actually easy. WP have theme_page_templates filter. add_filter('theme_page_templates','fx_pbbase_register_page_template'); function fx_pbbase_register_page_template( $templates ){     $templates['templates/page-builder.php']='Page Builder'; Theme can easily add support for the plugin by creating “templates/page-builder.php” file and take control of the page output if needed (e.g hide page title, full width/no sidebar, etc). Add Page Builder Control/Setting Instead of using meta box, I’m going to add the “page builder” after/below the Content Editor. In this tutorial, we are going to use placeholder text to display Page Builder Control. WordPress have edit_form_after_editor hook to add content right after the visual editor.
Share This

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.