Add Custom HTML webpage in WordPress

Being active member of an Internet marketing forum, I have seen several forum threads asking how one can use a custom HTML template or webpage in WordPress.

I have an awesome HTML webpage designed for my sales page or product. How do I use it in WordPress?

If you are an Internet marketer, you must have had occasions when you need a landing page for some product or offer you sell or promote. You might want a splash page or a dedicated squeeze page without any sidebar or header. WordPress is the most popular platform for creating websites.

Each WordPress website uses a theme to create the user interface or the front-end look. Generally, themes do not have a built-in feature to allow use of custom HTML page.

You can use a custom HTML template/webpage in WordPress by adding the same as a template. Follow these steps:

  1. Create a new file in your WordPress theme directory and name it my-page.php (or anything that you want).
  2. Add the HTML and CSS markup of your custom HTML page in the template file. The page should be self-sufficient in terms of elements.
  3. At the top of the template file, add the page template name in the format prescribed by WordPress:
    <php /* Template Name: My Page */ ?>
  4. Just above </head>, add <?php wp_head(); ?>. Right before the </body> tag, add <?php wp_footer(); ?>. The two tags will ensure that plug-ins and other back-end functions work properly.
  5. Now, you can go to the WordPress Dashboard and create a blank page with the ‘My Page’ template. (The template option should be available on the right sidebar.) Use a title, but no content. The content has already been added to the template.

You have your HTML-based page ready and active on WordPress. Use this simple trick to add HTML squeeze pages, sales letter pages, offer pages, etc.