Navigation
EricBrooks.Com - More Fun Than You Probably Deserve

Divider
WHUZZUP! Blog, News and gossip all over CyberTown WHUZZUP! Blog, News and gossip all over CyberTown WHUZZUP! Blog, News and gossip all over CyberTown
Downloads, graphic design, fonts HOORAY FOR BOOBIES!!!!
- October 3rd, 2008 -
Somebody loves me! YAY!!!!
- September 21st, 2008 -
Which EricBrooks.Com character are you?
- September 18th, 2008 -
Add to My Yahoo!
Add to Google
Downloads, graphic design, fonts
Downloads, graphic design, fonts Downloads, graphic design, fonts Downloads, graphic design, fonts

Divider
SoApBoX - Rants and Low-tech whining through Cyberspace SoApBoX - Rants and Low-tech whining through Cyberspace SoApBoX - Rants and Low-tech whining through Cyberspace
Downloads, graphic design, fonts Ladies, Beware of the 'Nice Guy'
- September 12th, 2008 -
How to *NOT* be Wrong in an Internet Fight
- August 17th, 2008 -
Seriously... Cho was a pu*sy.
- April 20th, 2007 -
Downloads, graphic design, fonts
Downloads, graphic design, fonts Downloads, graphic design, fonts Downloads, graphic design, fonts

Divider
Stats on the website Stats on the website Stats on the website
Downloads, graphic design, fonts 6,766,184
Visitors since 08/23/98
GeoURL

13 Users Online


Downloads, graphic design, fonts
Downloads, graphic design, fonts Downloads, graphic design, fonts Downloads, graphic design, fonts

Divider
Sign up for my monthly Newsletter Sign up for my monthly Newsletter Sign up for my monthly Newsletter
Downloads, graphic design, fonts Sign up for my monthly e-Zine and get the latest updates and offers available to members only

Subscribe
Unsubscribe
Downloads, graphic design, fonts
Downloads, graphic design, fonts Downloads, graphic design, fonts Downloads, graphic design, fonts

EricBrooks.Com® Search Engine Powered by Google Search Engine Powered by Google
© 2008 Eric Brooks Search Engine Powered by Google
WHUZZUP! Archives
What’s new at EricBrooks.Com plus newz and gossip all over CyberTown

How to skin your Wordpress theme

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. :D

  1. Open your wp-content/themes/[yourtheme]/header.php file
  2. Put in your skinning information in the header like you usually do.
  3. Open your wp-content/themes/[yourtheme]/footer.php file
  4. Hard code the variable information that you need, particularly this part…
<?php
$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.

See what I mean? :D

2 Responses to “How to skin your Wordpress theme”

  1. Jeanna Says:

    Well you did have a couple of posts where I would have left you a comment, but I couldn’t!

    phhhhhhtttttt !!!! :-D

    Nice job babe!

  2. Jim Mirkalami Says:

    I have been a frequent visitor of this blog for some time now, so I thought it would be a good idea to leave you with my thanks.

    Regards,
    Jim Mirkalami

Leave a Reply

Dots O' Links

Here are a list of other great blogs and journals for you to check out. Due to Technorati's way of ranking sites, and I don't have a blogroll, I've pulled these right out of my Links Page.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creative Commons License
EricBrooks.Com® is licensed under a Creative Commons License.

14 queries. 0.322 seconds. Powered by WordPress

Disclaimer: The views expressed herein are solely those of Eric Brooks. They do not necessarily reflect those of his employers, friends, contacts, family, or even his pets (though my cat, Puddy, seems to agree with me on many key issues.). In accordance to my terms of use, you hereby acknowledge my right to psychoanalyze you, practice accupuncture, and mock you incessantly with every visit. As the user, you also acknowledge that the author has been legally declared a "Problem Adult" by the Commonwealth of Pennsylvania, and is therefore not responsible for any of his actions.

EricBrooks.Com™ Mousepad

Vote for Me!!!!

Meet Me on MySpace

Divider
EricBrooks.Com - More Fun Than You Probably Deserve News | Fonts | Free Stuff | Crystal Ball | Design | Writings | Carlin | Cardshop | 3D | Links | Contact | About | Guestbook | Privacy Policy | "I support my friends" policy | Change the Layout | CB Gifts EricBrooks.Com - More Fun Than You Probably Deserve
Download Thousands of Free Fonts Download FREE wallpaper, 3d items, screensavers, photoshop items, etc SoApBoX - Rants and Low-Tech whining through Cyberspace WHUZZUP! Blog with News and Gossip all through CyberTown Send FREE E-Cards through the Eric Brooks .Com Cardshop See my web and design projects and see what I can do for you to build a web presence. Links to some friends and other great sites you might be interested in. Sign up for my monthly newsletter to know the latest. Please sign my guestbook and let me know you were here!