How to put a HTML page on a Wordpress Site?

6 replies
Hi,

I have a Wordpress based website in

And I have a HTML based web page.

How can I put the HTML based web page on a sublink or subfolder of my WP bsed website?

I mean like:

WP site: www.mywebsite.com

HTML page: www.mywebsite.com/theHTMLPage
#html #page #put #site #wordpress
  • Profile picture of the author rhinocl
    You have 2 options.
    1. Just ftp the page to your host and link your wWordpress site to it manually
    2. Build a template that has nothing but the page content.
      1. build the template, start with index.php, copy it and remove everything,you will need to add code at the top with the name of your new template, I won't go into detail as there are plenty of tutorials on line on how to do this.
      2. paste all the html code for your page into the template (everything inside the body tag)You can leave the get_header() and whatever other parts of the original template you want
      3. Now. createa new page (not post), select template just_made_template and publish it. (leave the body empty)
      4. You will want to put a title in and have your menu find it so that line in index.php needs to be left in
    {{ DiscussionBoard.errors[7970051].message }}
  • Profile picture of the author AbdullahKaragoz
    Option 1:

    I have uploaded it, all the files to the host.

    And I have changed the name from index.html to custom.html

    But it didn't work.

    Option 2:

    Can you link to a tutorial on how to do it?
    {{ DiscussionBoard.errors[7970112].message }}
  • Profile picture of the author AbdullahKaragoz
    I have uploaded them to the publich_html folder, where wp-admin, wp-content, wp-includes etc. folders are located.
    {{ DiscussionBoard.errors[7970188].message }}
    • Profile picture of the author rhinocl
      That should normally work, if you spelled everything exactly the same (including case) but there could be something in the .htaccess folder that is causing a problem. Rather than trying to decipher that you could post it or look in your WordPress general settings and see if the blog location is the same as the address where it displays- this should give you a clue where to place the file.
      {{ DiscussionBoard.errors[7971785].message }}
  • Profile picture of the author psvent
    1. Add this on top of your HTML file:

    Code:
    <?php
    /**
     * Template Name: My Custom Template
     */ ?>
    ...and upload it to the theme folder of the theme you are using. wordpress/wp-content/themes/xyz-theme.

    Then if you go to add a new Page you should see "My Custom Template" in the template select box. Just set the template.

    If you go and view the page you should see your HTML.

    But at this stage the layout will probably be messed up as you will need to change the CSS, JS, image paths.

    Open up the modified HTML again and make sure your css files are set at something like "/mystyle.css" and then upload the html again and also any css files. You can put them where you can find wordpress/index.php. You could also put css and js in css/js subfolder respectivly.

    This is more or less a quick and dirty fix the proper way would be to create a child theme and use WP functions to include any CSS/JS files.
    {{ DiscussionBoard.errors[7974673].message }}

Trending Topics