Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:PotterSys/Home Page as a Splash Page

This article is a ROUGH DRAFT. The author is still working on this document, so please do not edit this without the author's permission. The content within this article may not yet be verified or valid. This information is subject to change.

I think this article needs a full change. I'll work during the week-end (if the Backup Week doesn't disturb me a lot)

Article Name Change: Creating a Static Front Page

Known as a static front page or splash page, this is the first page seen by users entering your site. Unlike a traditional WordPress front page, featuring the WordPress Loop which generates a list of your most recent posts, the static front page is a customized page that lacks the The Loop and displays static information that can either invite people to "click through" to the real good stuff or offer highlighted post or article features and information that direct users to different areas of your WordPress site. It can have static information and links that do not change, or in can incorporate some automatically changing information.

There are many things you can do with a static front page, so let's take you through your options.

Create a Simple Splash Page

A splash page is usually a HTML static introduction page featuring a logo or graphic invitation to enter your site. You can add a navigation menu, too, but the splash page is usually the graphic welcome rather than a sampler menu of your site. It often features a logo or some graphic with the invitation to click to enter. It might have Flash, animation, or just a few words.

By default, most websites feature their main page as one of the following:

  • index.html
  • home.html
  • index.php
  • home.php
  • default.htm

You can choose to have one of these be your static front page if you like.

1. Using a text editor, open a blank document.

2. To include the header from WordPress to maintain a consistent look, add this to the top of the page, using the folder path name you installed WordPress into:

<?php define('WP_USE_THEMES', true);
require('./wordpress/wp-blog-header.php'); ?>

3. To add the sidebar and/or footer, include the following at the bottom of the page, using the same folder path:

<?php get_sidebar(); ?>
<?php get_footer(); ?>

4. In between, add your static page information.


Normal Page

<?php define('WP_USE_THEMES', false);
<div id="content" class="narrowcolumn"><h1 style="color:#000;">Welcome to my 
<p>Hello and welcome to my site. You can go to my web page about how to improve 
your shoots with your digital camera; or you can go to my blog</p></div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

When you install WordPress, you can install it into its own folder and retain the index.php that comes with WordPress. The link to enter your WordPress driven version of your site would be to this /wordpress/index.php from the root /index.php.

Helping WordPress Find Your Static Front Page

  1. Create your splash page
  2. Create a new folder on your site server for ????? WordPress? the new static splash page?
  3. Download index.php WordPress file and open it in a text editor.
  4. Change the require('./wp-blog-header.php'); line to require('../wp-blog-header.php');
  5. Save and upload the modified index.php file into the new folder.
  6. Login into your WordPress Administration Panel, and go to Options→General.
  7. Change your Blog URI pointing to the new folder. For example, if your site is http://example.com, and the new folder is called blog, enter http://example.com/blog.

Now you can upload your splash page to your root server folder (usually called public_html)

Adding PHP to the Static Front Page

How to incorporate automatic information from the WordPress site - like mini feeds or mini loop.

Changing via Apache .htaccess file

When you request a folder in a Apache web server (for example the folder called /weas), the core of Apache will search for a file with any of the names in a list saved on httpd.conf To be continued