WordPress: Creating Static Pages
My friend asked me how she could create static pages in WordPress, but also keep the theme she was currently using. The easiest way to do this is to use this code:
<?php
require('./wp-blog-header.php');
$themes = get_themes();
$current_theme = get_current_theme();
$current_template_dir = $ themes [ $ current_theme] ['Template Dir'];
include($current_template_dir . "/header.php");
?>
<div id="content" class="narrowcolumn">
YOUR STATIC CONTENT GOES HERE
</div>
<? php include($current_template_dir . "/sidebar.php"); ? >
<? php include($current_template_dir . "/footer.php"); ? >
Your page, take about.php for example, will reside in your blog directory. And in about.php, you will have the above code. To edit the file, you can log into your WordPress Admin Interface. Then click on Mange -> Files. Then type in about.php to start editing.
I found this code a while ago on the WordPress Support forum, but I can’t seem to find it again.
[Note] I had to add spaces between variables since WP didn’t like displaying them…


@






