Let’s say I have a one-page Javascript-heavy web application.
But for the rest of the site, I want the easy of creating content pages with WordPress.
Should I:
-
Have the web application in the root, install WordPress in a sub-folder and apply the same theme to both (ugh)?
-
Somehow write the application as a plugin for WordPress? If so, where do I start?
-
Other?
Edit
The app in question is simple in that there is a form on the page, with custom divs underneath it. The jQuery/Javascript script does the hard work by manipulating those divs to add content, based on what was submitted in the form.
Personally I would create a file in the theme called application.php for example and write the following in it
Followed by a copy and paste of your page.php in the theme folder. In this way you create a new template only just to be used for your application.Where there is the the_content() replace it with your heavy javascript.
Once saved then create a new page and on the right side you should have a dropdown with the templates… here select ApplicationPage and press Save.
Now when you visit this page this should have the custom code you included in application.php
For a better overview : http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/