• Resolved garbonzo

    (@garbonzo)


    Hi,

    I read through the ‘creating a static front page’ page, and I tried it and it works for me… if the extension of the file is php.

    But I want to do this for an html file, and just changing the extension doesn’t work.

    Specifically, I’m trying to get an html to pull my blog’s header, sidebars and footer. It won’t even need a loop because the text is just going to be a “welcome” paragraph.

    This is my php file, which works fine:
    <?php define(‘WP_USE_THEMES’, false);
    require(‘../garby/wp-blog-header.php’); get_header();?>
    <?php get_sidebar(); ?>
    Welcome message
    <?php get_footer(); ?>

    But if I change the extension to html and load up the page in my browser, all it shows is “Welcome message”

    How do I work the html? Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • moshu

    (@moshu)

    How do I work the html?

    Why do you need html? and PHP scipt will not work in html.

    davidchait

    (@davidchait)

    you can’t change it to html. it has to be php to run php directly. there are other methods, say javascript or iframes, in which you could somehow pull in content.

    you should be able to have index.php in your root, delete index.html (or rename it), and apache should pick up the php version automatically.

    -d

    Thread Starter garbonzo

    (@garbonzo)

    Thanks guys.

    And fyi moshu, I was using pure htmls to run my site before switching to wp. I want to leave them where they are (file name intact too) because the search engines list all of them, but now I want them to reflect the new look of my site.

    I’ll look into frames I guess.

    Thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I make a static html that runs php?’ is closed to new replies.