1

I want to build a plugin page with form options and a live preview to auto refresh and display the changes on the frontend. Is it possible to show a live preview of the frontend in the plugin options page?

Similar to WP > Appearance > Customizer but in a plugin options page with custom styled form elements and responsive preview.

What is the best approach you have had success with? Did you use a WP customizer API I do not want to use any framework as this is a very simple project.

Thanks in advance Vinay

  • 2
    If you want a preview of the front-end, why not just use the Customiser? – Jacob Peattie Jun 25 at 5:12
  • I need a custom preview window inside the plugin options page. – Vinay Kashyap Jun 25 at 7:32
  • But why not add your options to the customiser? Then you don’t need to do anything special. – Jacob Peattie Jun 25 at 7:33
  • As the plugin grow some dynamic data and demos will be added to it which can be too many things to fit in the customizer so I want to create a live preview inside the custom plugin page. – Vinay Kashyap Jun 25 at 7:36
  • If it's as simple as you say, @JacobPeattie advice is sound. Otherwise your options are to create a JS/jQuery-powered preview or use an iframe to render the homepage and inject scripts and styles into there – brianjohnhanna Jun 26 at 14:04

Your Answer

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

Browse other questions tagged or ask your own question.