19-Apr-2015

Creating a Splash Page for WordPress

A front page is a great way to greet your users. Read on to make one for WordPress.

Qdoslandscape Landing Page, by Rinet IT
Qdoslandscape Landing Page

The front page, or Splash page, as they are called was not to use any of the pages.

Rather the front page was to be invisible to show the full screen image of one of the gardens.

At first it seemed easy but then a few problems came up that needed fixing.

WordPress uses themes which control the look of the whole site. For the default "front" page you have the choice of showing a page or a blog.

For this site the front page was to show the background image only. I made the front show a page, but even with no text it showed a large white rectangle hiding the background. I could have made the background transparent but there might have been some artifacts spoiling the view.

Making the Template

After some research using Google I created a template for the theme. To create the template, start with an empty text file and enter the following at the top:

<?php 
/* Template Name: Splash2
* The template for the splash screen, ie background image only.
 * Based on header.php
 *
 * Displays all of the section and everything up till *
 */
 ?>

This template is called Splash2. To use the template copy it to /wp-content/themes/.

Using the Template

Once copied go back to the dashboard and edit the front page. Under Page Attributes select your new template using the drop box.

The template can now be edited to get the look required. First I copied the page.php contents. It worked fine for every browser except Internet Explorer versions 8 and 9. I suspected that some tags were not being closed off. So rather than use get_header() I grabbed the contents of header.php and modified that, checking that all tags were closed.

 

 

 

 

Leave a Reply

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram