Edit raw HTML of the landing page

It is very strange to me that you are using WordPress and want a “pure html+css+js page”. That sort-of defeats the purpose of using WordPress, and honestly building with PHP is so much more convenient and powerful that I never want pure HTML anymore.

But here is how to do it…

You could dig through your theme and find the file responsible, but you’d be hacking the theme and you would lose the changes when the theme updates. Instead, create a custom page template and leave out wp_head() and wp_footer() so that all you have is this:

<?php
/*
Template Name: My Custom Page
*/
?>
<html>
<!-- etc -->
</html>

Now go to the admin screens, create a page, and select your template. Then go to Settings -> Reading and select your page as the static front page.

If your theme does not already have a front-page.php file you could use that but how that template loads can be confusing. I’d consider the first method more bullet-proof if you are not already familiar with theme creation.

Leave a Comment