WordPress.org

Support

Support » How-To and Troubleshooting » Static Front Page

Static Front Page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    @macmanx

    Per the instructions I put the following line in the html file in the root directory

    That’s the problem – the .html.
    It will work only with an index.php If you can, just rename your index file and it should work.

    Actually, I do have that installed and I think it’s doing what it’s supposed to do. Let me describe what I’m trying to do. Maybe I’m going about it wrong.

    I’d like my web site to have the same look as WP as far as headers and footers are concerned with WP installed in a subdirectory. So I thought that what I should do is use the code in my first message to “insert” the header in the site’s html files. Like I said. that hasn’t worked as described in the article but I’m probably doing something wrong.

    What the static-front plug-in does is start the blog with the Page that has a slug of Home. But what I’m trying to do is have my home page in a normal html file outside the WP and again, have all the web pages take on the same look and feel.

    Boy, I hope I’m being clear enough.

    I think our messages crossed. I didn’t see the renaming suggestion. I renamed the file and it works.

    THANKS!!

    Yes, now it is clear.
    1. As I said before: no php code will work in a html file.
    2. You can just manually redo/style your html index file to look like your blog’s theme.

    Edit. OK, so it works 🙂 Glad to hear that.

    EDIT: OOPS, Too Slow 🙁

    sedelstien,

    did you read what moshu said?

    It must be a php file if you wish to execute the code you pasted above.

    This should work:

    <?php define('WP_USE_THEMES', false);
    require('blog/wp-blog-header.php'); get_header();?>
    <div id="content" class="narrowcolumn">
    <h1 style="color:#000;">Welcome to my site</h1>
    Hello and welcome to my site. You can go to my web
    page about how to improve your digital photography
    techniques with your new digital camera; or you
    can <a title="Go to my Blog" href="/wordpress/index.php">go
    to my blog.</a>
    </div>
    <?php get_footer(); ?>

    Save that as index.php in the root directory of your server (or wherever) and have the blog below in a directory called “blog”

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static Front Page’ is closed to new replies.
Skip to toolbar