I have a page I’ve developed in html and javascript, but I need to integrate it in a site developed in wordpress.
Is there a way to do it?
Thanks fo all the help!
I have a page I’ve developed in html and javascript, but I need to integrate it in a site developed in wordpress.
Is there a way to do it?
Thanks fo all the help!
You must be logged in to post a comment.
Yes, but it isn’t going to be particularly quick or easy. You need to either take the existing template files and integrate them with your HTML/CSS/JS, or create a new theme from scratch. Essentially, this entails creating a bunch of templates and adding PHP template tags that are used by WordPress to display content, etc.
Helpful links from the WordPress Codex:
IMO, the best way to go about this is to take your front end template code (the HTML, CSS, JS you wrote) and use it as a base for writing a WordPress theme from scratch. ThemeShaper has a fantastic and in-depth “write a WordPress theme from scratch” tutorial which you can find here.
It might take a bit longer than hacking your code into whatever existing theme the site is using, but it will be much cleaner and you will learn much, much more in the process.
Edit: Just saw your comments – you should have specified that you are not creating a new theme from your template but just want to put that single page into a pre-existing theme in the first place. In that case, it really depends on what you mean by “integration”. If your page doesn’t need to access any WP functions or database info, you can just upload it and interlink it from the other pages.
If you do need WP functions, there are a few options:
wp-load.php
orwp-blog-header.php
in the header to load WordPress core. See this WordPress Answers post for details.