[quote=“Rechtech, post:4, topic:232018, full:true”]
I want a static html site that doesn’t inherit anything from wordpress. It will be a 2, 3 page site.
All pages will have custom head and and body.[/quote]
Assumptions
I should imagine your site has an Apache Server and WordPress follows all the latest PHP Frameworks and CMS conventions by having Apache redirect all HTTP Server Requests through to /index.php.
The root file, index.php checks the Apache $_SERVER['REQUEST_URL']
variable and calls the appropriate page.
One way to create a very simple HTML site is to follow these steps:
- rename the existing index.php to index-WORDPRESS,php so that you can always return to the old site.
- copy the following code to a new /index.php
<?php
// index.php - 2016-07-30
error_reporting(-1);
ini_set('display_errors','1');
$page = substr($_SERVER['REQUEST_URI'], 1);
if( strpos($page, '.') ):
$page = strstr($page, '.', true);
endif;
switch($page):
case "contact":
require 'justhtml/contact.html';
break;
case "faq":
require 'justhtml/faq.html';
break;
case "term":
case "terms":
require 'justhtml/terms.html';
break;necessary
keep all th
default:
require 'justhtml/home.html';
endswitch;
exit;
- create a /justhtml directory under the root to isolate and not confuse your new HTML files.
- check out the following “Online Demo” link and open each page
- right-click each page, highlight and copy contents
- paste into new files located in the justhtml directory:
home.html
contact.html
terms.html
faq.html
style-2016-07-30.css
You will now have four pages which can be called from your browser with or without the .HTML extension (Pretty URLs).
The files can also be called individually by prefixing with the justhtml/ path both with or without the .html extension
Example:
Edit:
Added canonical links to each page.