Beautiful day

Today’s May 1st and by golly the weather is beautiful. Also its the 1st day all habitants of our household have had the same day off since we moved in back in December.

Gillian and I saw “Kick Ass” last night and I must say it definitely lived up to it’s title.

Going to dinner at Zen Sushi on St. Marks and 2nd Ave for Sabrina’s birthday tonight.

Time to do “things.”

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.