How to Embed HTML files directly into WordPress

It would really help to know exactly what you’re trying to achieve. The more you work with WordPress, the more the sentence “Necessity is the mother of invention” makes sense.

A WordPress site is essentially snippets of html code put together with php. For example, header.php contains the instructions to build the header, the page template has the instructions for the body and footer.php has the instructions for the footer. I say they contain the instructions, because they usually hook into other functions to build the whole section.

Because of that, you wouldn’t be able to take an entire html page with its own head, body and footer and just put it in WordPress.

Depending on what you are trying to do, the 3 most common ways to “import” html are:

1- You can paste html code in the WordPress editor with the “Text” tab in the top right, as opposed to “Visual” which is a WYSIWYG editor.

2- PHP is made to work with html so you can add the html code directly into your .php files (ideally with a child theme). The simplest way to display html with php is usually with echo.

3- If it’s a page design, you can make a PHP version of it, put it in the template folder and use that as a page template in WordPress.