Scrivenings.net

I have been help­ing my Whiskerino friend Scrivener set up his new Word­Press stand-alone site.

On the sur­face things may not appear to be much dif­fer­ent com­pared to the stock theme Scriv selected, but I changed a lot under the hood to get some of the func­tion­al­ity he wanted. The excit­ing part was being able to help him com­bine his per­sonal blogspot blog and his Project 365 photo blog (also on blogspot) into one. Basi­cally the 365 blog was imported directly to a cat­e­gory but since Scrivener wanted to keep those posts sep­a­rate from the other posts I excluded that cat­e­gory from dis­play­ing in the front page using the query_posts method and cre­ated a page which calls a sep­a­rate loop exclud­ing all of the other cat­e­gories. I used some­thing like this:

< ?php
if (is_home()) {
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=-7&paged=$paged");
}
?>

For the page I changed is_home to is_page ('Project 365') and ("cat=-7") becomes (cat="7")

(You will find exam­ples of this code which leave out all that $paged busi­ness. This needs to be left in if the loop appears on a page oth­er­wise your abil­ity to browse through pre­vi­ous posts is compromised.)

I had to cre­ate new loops using the new Word­Press 1.5+ loop tags, since FallSea­son uses the old WP 1.2 tags (for some rea­son) and this get_query method wasn’t coop­er­at­ing with it. So basi­cally the front page and the Project 365 page are rebuilt from scratch. I plan on updat­ing the other files with the new tags soon but will prob­a­bly only do it as needed.

I also installed a few plu­g­ins to make both mine and Scriv’s lives eas­ier: A plu­gin to batch edit the imported posts (buggy but still a life­saver and some­thing I think Word­Press should be able to do out of the box). A plu­gin to include an “About” page in the side­bar so Scriv doesn’t have to edit the code to change his “About Me.” Finally, I installed execphp which allows sev­eral cus­tom php-based wid­gets for the wid­getized side­bar. I’ve never used a wid­getized side­bar before but I dis­like how dif­fi­cult it is to mod­ify the tags in one, so this made things so I didn’t have to dig into the word­press admin files and change any­thing. (If it were my own site I would have turned the wid­gets off com­pletely and edited my own code, but since I am doing this for some­one else I thought it was impor­tant to make things fairly easy for Scrivener to change on his own.)

Also, since Scrivener is a flickr fanatic I made him a cus­tom flickr badge for his header. It’s actu­ally three badges dis­play­ing dif­fer­ent con­tent from his flickr feed.

Actu­ally, I hap­pened to men­tion to Scrivener that my Flickr account was expir­ing and he renewed it as pay­ment for help­ing him with the site, which was a really, really cool sur­prise! I was hav­ing fun work­ing on the blog because I really want to redesign my own site but its just too much trou­ble to start all over again. I know I will still end up doing a ton more for scrivenings.net but I feel less urgency because it isn’t my own site. I don’t mean that I am less moti­vated to work on it– quite the con­trary– but it is eas­ier to focus on what needs fix­ing when some­one else is mak­ing the deci­sions about what needs to be fixed next.

I’m no php genius, but I think I’m doing pretty well for a hack. Not a hacker, a hack.

Don’t for­get to watch us grow beards in November.

One Comment