What's the process for including custom HTML pages in WordPress?

Hey everyone, I’m trying to figure out how to put my own HTML pages into WordPress. I’ve got this page called items.html and I want to add it to my site.

I’m not sure how to do this. Can someone explain how I would:

  1. Add the page to WordPress
  2. Put it in a menu
  3. Actually view the page on my site

I’m confused because WordPress has its own way of doing URLs. Any help would be great!

Here’s a bit of my HTML file if it helps:

<div class="product-list">
  <h2>Our Items</h2>
  <ul>
    <li>Widget A</li>
    <li>Gadget B</li>
    <li>Gizmo C</li>
  </ul>
</div>

Thanks in advance for any tips!

hey there! i’ve done this before. easiest way is to make a new page in wordpress, then switch to the text editor and paste ur HTML there. it’ll show up like any other page. just add it to ur menu from the wordpress menu settings. no need to mess with files or anything complicated!

I’ve tackled this issue before, and there are a couple of ways to approach it. One method I’ve found effective is creating a custom page template. Here’s what you can do:

  1. Create a new PHP file in your theme directory, naming it something like ‘custom-html-template.php’.
  2. Add the WordPress theme header to this file, specifying it as a custom template.
  3. Below that, include your HTML content directly or use PHP to include your HTML file.

Once that’s done, create a new page in WordPress, select your custom template from the page attributes, and you’re set. For the menu, just add this new page like any other.

This approach maintains WordPress’s URL structure and integrates seamlessly with your site. It’s more maintainable long-term than trying to force a standalone HTML file into WordPress.

I’ve been in your shoes before, and I can tell you that incorporating custom HTML into WordPress can be a bit tricky at first. One approach that’s worked well for me is using a plugin called ‘Insert PHP Code Snippet’ or something similar. It allows you to embed custom HTML directly into WordPress pages or posts.

Here’s what I’d suggest:

Install the plugin, create a new page in WordPress, and use a shortcode provided by the plugin to insert your HTML. This method preserves WordPress’s URL structure and makes it easy to add the page to your menu through the standard WordPress menu settings.

Just be cautious with this approach - make sure your HTML is clean and doesn’t conflict with your theme’s styling. Also, keep in mind that if you switch themes or update WordPress, you might need to review your custom HTML to ensure everything still looks and functions correctly.