Moving out is awesome!

So recently my girlfriend and I moved in to a duplex in Bushwick, Brooklyn. This is our first foray into living on our own, and so far it has been awesome.
2 awesome roommates. Lots of friends nearby.

I have been very busy as of recently. Working on a lot of projects.

2010 off to a great start.

Cheers!

is_subcategory()

Ok, I just spent the better part of ALL DAY trying to figure this out.

I want my wordpress category.php template to be able to detect whether the category it is serving is a parent category or subcategory. THATS IT. And without having to hard code any category ID’s. After perusing the forums and codex for a couple of hours, the marriage of these two functions seemed to get the job done.

get_query_var is the variable stored in the query that tells category.php what category to serve.

get_category retrieves category data given a category ID or category object.

Here’s the function that goes in your functions.php file:

function is_subcategory (){
    $cat = get_query_var('cat');
    $category = get_category($cat);
    return ( $category->parent == '0' ) ? true : false;
}

Then you can use this in your category.php file to determine if the category you are serving is a parent category or subcategory:

if ( is_subcategory() ):
     //displaying subcategory
else:
    //displaying parent category
endif; 

Hope this helps some people out there.

*note: both code snippets should be wrapped inside php brackets. <?php ?>

WordCamp NYC 2009. Be there, or be square.

WordCampNYC – Nov 14-15

I’m very excited to say that I will be attending WordCamp NYC 2009. I have been working with WordPress for the past two years and it has completely revoltuionized the way I design web sites.

If it weren’t for WordPress, I wouldn’t lead the life I live today. But that aside, its exciting to participate in such an awesome community. I look forward to meeting fellow WordPress users and abusers.

My beef with the CMJ festival

Ok so ever since I can remember the CMJ Festival, I would peruse the listing of bands playing and for one reason or another would never recognize any of them. Now I do understand its a showcase of emerging artists, so chances of my having heard them before is slim. HOWEVER, after the fact I always come to find out that bands I DO actually like ALSO performed, but it wasn’t really advertised or promoted. WTF ?!@#$

Ok so that’s my beef with CMJ. However one year I did manage to see Dillinger Escape Plan open up for Ol’ Dirty Bastard (RIP) on a CMJ Showcase. Badass.

Go back to Google’s original size search bar

So as some of you may have noticed, Google made their search bar more accessible to the geriatric community by enlarging the search bar and font size. Now as a human being (aka ‘creature of habit’), this bothers the hell out of me. I’m totally not used to it, I don’t want to get used to it. Just put it back to normal.

In comes, GreaseMonkey.

Now I’ll be the first to admit, I have a problem with Firefox plugins, in that I use entirely too many. But this one is totally worth it. With user scripts that return the Google search bar back to normal, pimp out your google reader, AND google calendar, you can’t go wrong.

I’ve fallen in love.

Links courtesy of Lifehacker.