I have comments again, YAY ME!
Not that anyone leaves comments… buuut… π
When I upgraded to WordPress2, I had a hard time making a flexible theme, so I ditched that idea and decided to parse the code myself (like I did with the original WordPress). The problem? My individual posts no longer had comments. (UH OH!)
So how do you make a theme that is flexible with your Domesticat-like skinning abilities?
You make a theme inside a theme, of course. π
- Open your wp-content/themes/[yourtheme]/header.php file
- Put in your skinning information in the header like you usually do.
- Open your wp-content/themes/[yourtheme]/footer.php file
- Hard code the variable information that you need, particularly this part…
$total_skins = 3;
$default_skin = 3;
if (isset($_REQUEST[‘newskin’])) {
$newskin=(int)$_REQUEST[‘newskin’];
if ( ($newskin<1) OR ($newskin>$total_skins) ) $newskin=$default_skin;
$skin=$newskin;
} elseif (isset($_COOKIE[‘skin’]))
$newskin = $_COOKIE[‘skin’];
elseif (isset($_REQUEST[‘newskin’])) {
$newskin=(int)$skin;
if ( ($newskin<1) OR ($newskin>$total_skins) ) $newskin=$default_skin;
} else $newskin=$default_skin;
include(‘/home/yoursite/public_html/skins/$skin/footer.php’);
?>
</body>
</html>
That part is the one that tells your theme what skin the reader has selected using. (It’s slightly changed from the Domesticat version as you can’t set cookies in the footer.).
For whatever reason, WordPress kills all your variables right after it does its thing. You need to re-code your variables in the footer as well.
Do you live in the Poconos and looking for a great online community to mingle with? Check out Our Pocono Community. It has news, resources, a hi-tech chatroom, an arcade and a group of vibrant personalities on their message board, The Pocono Speakeasy.
My good friend Mikki is taking place in an event in June: AIDS/Lifecycle
We’re still closed to the public, but Problem Adults 3.0 is still under renovation and getting better and better….
We’ve decided to close our doors to the public at Problem Adults for a while. We’re regrouping and going back to the original vision of making it a virtual playground for the Web Elite…