I needed to create a blank page using anyone’s theme to fit my indexing tool into a blog.

I couldn’t find a universal one that would work, but this one just requires that you copy your 404 page (the simplest one I could find) and add a couple of lines to it to create a standalone page.


1) Go into your dashboard and click appearance.
2) Select ‘editor’  (In appearance 3rd link down underneath themes and widgets)
3) On the right hand side click on 404 Template (The top option)
4) Copy and paste the contents into a new notepad file.
For mine it is
<?php get_header(); ?>
<div id=”content”>
<div id=”maincol”>
<div class=”col-inner”>
<h2 class=”pagetitle”>Error 404 – Not Found</h2>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
5)    Change  ‘Error 404 – Not Found’ to ‘TEST PAGE’
If you don’t do this step you will get Error 404 – Not Found displayed and you wont know if it is your page or an error.
6)    Save the file as test.php
7)    Upload the file to your blog root directory
8)     Test the file by going to your blog URL with /test.php added to the end
9)     eg yourdomain.com/blog/test.php

This should display a page that matches your blog with the text ‘TEST PAGE’
10)    Replace ‘TEST PAGE’ with anything you like to create your own standalone page.

You may want to modify this into a header and footer that you can add to any page.
I’ve saved this part as myheader.php:

<?php
define(‘WP_USE_THEMES’, false);
require(‘wp-blog-header.php’);
?>
<?php get_header(); ?>
<div id=”content”>
<div id=”maincol”>
and this as myfooter.php:
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>

Your page format will now be:

<?php include (“myheader.php”);?>
<h1> TEST </h1>
<?php include (“myfooter.php”);?>

You can see this working in my indexing tool at

http://www.keithpurkiss.com/blog/autobacklinkcode.php

Filed under: General

Like this post? Subscribe to my RSS feed and get loads more!