• To preface this, I’m pretty HTML and CSS illiterate and I plan to use one of the templates from WP themes.

    I wanted my blog only to be one part of my website, so I installed it in a /blog subdirectory. Of course, when someone goes to the main home page there’s nothing there. I’m looking for an easy way to keep the look and feel of the WP theme (including navagation bars on the borders, etc) for my main homepage, but leave the main “body” of the page open so I can type in a few paragraphs.

    If this is too difficult to describe to someone with my limited knowledge, then I was wondering if there was a way to at least point the blog to my home page for the time being so that at least there isn’t a blank home page until I put a real one there.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Here’s the simple way to do this:

    1. Make a copy of your active theme’s index.php. This will become the ‘simple homepage.’ Let’s call it your main index.php.

    2. Edit your main index.php, so that the following is the first line in it:

    <?php include('./blog/wp-blog-header.php'); ?>

    This assumes your main index.php resides in the directory above /blog. Just make sure the path to wp-blog-header.php is correct.

    3. Edit out The Loop code from your main index.php and replace it with whatever text you want to use. At least a little HTML knowledge would be helpful here…

    4. Upload the main index.php to your site. If you have an index.html or other “main page” document, remove it so there’s no conflict.

    5. There is no step 5.

    Thread Starter gamesizing

    (@gamesizing)

    Thanks, I’ll give it a try!

    Hi, I was very interested to read this thread. I did something different, but don’t know if I did the right thing. I used the “View Source” command in my browser to copy the code of one of my page.php pages and turn it into an HTML file. I loaded that index.htm file to the server.

    I assume that your method keeps all connections to the template (sidebar text, archives, etc.) where my method completely disconnects those things. Is that correct? Any other differences between these methods?

    thanks

    Any other differences between these methods?

    Mainly it’s a loss of any dynamic functionality the various WordPress and PHP components provide. A basic example would be if you list archives by month in the sidebar, this will not update (i.e. new months for your archives will not display) in a static page as you’ve created.

    Beyond that, if it works for you then there’s nothing wrong with doing it this way.

    Thanks to both of you for this thread.
    My site is a combination of static and dynamic pages, so it’s good to know both methods.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Simple homepage when blog isn’t the website itself’ is closed to new replies.