WordPress.org

Support

Support » How-To and Troubleshooting » How do I add a custom HTML to a WordPress site?

How do I add a custom HTML to a WordPress site?

  • Hi!

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael
    Forum Moderator

    @alchymyth

    ubaidullahbutt
    Member

    @ubaidullahbutt

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I add a custom HTML to a WordPress site?’ is closed to new replies.