[wp-pro] Placing wordpress outside of themes and wordpress
steve luiting
stevel4857 at yahoo.com
Thu Feb 21 20:26:15 GMT 2008
I've found a pretty good hack for moving all of
wordpress out of the theme and wordpress directory.
Make sure you have a .htaccess file and add this to
it.
---------------------
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
---------------------
That code allows php code in .htm files.
Then add this into the <head></head> of your html
file:
---------------------
<?php
define('WP_USE_THEMES', false);
require('wp-blog-header.php');
require_once("wp-config.php");
?>
---------------------
if you place your html in a sub-directory such as
blog/index.htm make sure the url is relative like so:
---------------------
<?php
define('WP_USE_THEMES', false);
require('../wp-blog-header.php');
require_once("../wp-config.php");
?>
---------------------
It goes without saying that if your wordpress is
installed in a subdirectory you need to point to that
for these files.
That's it. No need to change the theme because
index.htm in the root directory overrides all theme
files.
To have your full page article (index.php) file read
in the root it gets fancier. in the .htaccess file add
this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .
http://www.yourwebsite.com/full_article.htm
</IfModule>
and it redirects your index.php there instead. Since
it's .htaccess redirect it shouldn't effect google
rankings.
Now you can edit with Dreamweaver. Just place your
wordpress loop code into the html.
Of course it can get way more complex. But this is
simple enough.
Steve
zspace.biz
steven luiting
web & print design, flash animation & programming
zspace media
720.422.8897
9562 Brentwood Way, Unit A
Westminster, CO 80021
http://www.zspace.biz
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the wp-pro
mailing list