What I am Working on

I’ve had a fairly productive 2 weeks at the new job doing some serious work with WordPress and it’s time for me to jot down some notes before I forget everything that I’ve done.

The front page is 100% automated pulling posts from a single category twice, all of the posts once plus the feed from a message board. Almost exactly like the homepage here. A new addition to the layout that I have not used before is a jQuery slider. After some tweaking it’s actually very very cool. To get an idea, it works like this. I will be getting more into jQuery in the very near future.

Moving off the home page is a custom category template where, if need be, a different header graphic can be displayed for each category. Too keep the template file to a minimum, this is all driven from 2 php files and 1 css file. Normally you could build out 1 category template for each category, but with over 20 cats, that would get to be a bit unweildy. Same goes with the CSS. It’s just easier to keep all those category page specific styles in their own file. Turns out, I am not doing the individual templates, but should minds change, it’s ready to go.

From there, it’s just a normal single.php and index.php to display everything else.

Something new I’m having to deal with is user accounts. No comments without first creating an account and all that. I did it once and did not like the fact that a regular user, upon logging in, sees the WP Dashboard. A quick google search got me a hack for wp-login.php that redirects on login to whatever page I specify. Very very cool. I will be adding a login area anywhere that is needed to keep normal users from seeing either the WP login page or the Dashboard.

And, of course, since I have user logged in or not information, I’m able to do some cool if-else magic for displaying ads or not, changing sections of the page, or not. Pretty much whatever I want to do. Could probably have a completely different theme for users that are logged in if I wanted to. Very very cool stuff.

In total there are 17 template files, 4 files for the script that runs the slider and 3 CSS files. By far the most involved theme I have ever built. And right now it is 100% operational. I need to do a little tweaking on the layout yet plus run it through IE.

I hope it passes.

By Don

Lead bottle washer at donburnside.com, host at whiteroofradio.com and tech guru for the MotoringFile family of sites.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.