How do I add a custom HTML to a WordPress site? (3 posts)

  1. Grv21
    Posted 3 years ago #


    So I have this problem that I need to add a few HTML templates with images to my WordPress. Now how do I do that?

    How do I bypass the default theme and use those HTML pages as my theme?
    What do I start with?

    I seriously have no idea how to do this. I created the HTML & CSS myself with Notepad++ and now those need to be moved to a CMS like WordPress.

    Please, help ASAP.

  2. Michael
    Forum Moderator
    Posted 3 years ago #

  3. ubaidullahbutt
    Posted 3 years ago #

    Just create page templates, for example you want to make a HTML template "example", then create a file template_example.php in your theme folder.

    In the above section of file, add <?php /* Template Name: Example */ ?>, and put your HTML below the above mentioned code.

    Now go to admin side, create new page and choose template name "Example".

    Here you go, but you can face problems with images. Because you might have image sources like that images/aaa.png.

    So you can use like that <img src="<?php bloginfo('template_url'); ?>/images/aaa.png" />

    if you any problem let me know.

Topic Closed

This topic has been closed to new replies.

About this Topic