Monthly Archive for December, 2008

It’s good to be alive

i’m coming home from my hardest year
i’m making plans not to make plans while i’m here
and this life has been no holiday, a complicated situation
i’m fine with all my memories
still i could use vacation

it’s christmas in california
and it’s hard to ignore that it feels like summer all the time
but i’ll take a west coast winter to remove my splinters

it’s good to be alive
it’s good to be alive

i’m coming home to the lights and buzz
streets look the same, still nothing’s as it was
this place is paradise i’m sure, here’s my reservation
i’ve gotten lost here once before
inside a good vibration

it’s christmas in california
and it’s hard to ignore that it feels like summer all the time
but i’ll take a west coast winter to remove my splinters

it’s good to be alive
it’s good to be alive
it’s good to be alive

and time, time it stops for no one
the seasons come and go and that’s just time
yeah time it stops for no one
the seasons keep on going
whether or not we’re blind

christmas in california
and it’s hard to ignore that it feels like summer all the time
but i’ll take a west coast winter to remove my splinters

it’s good to be alive
it’s good to be alive
it’s good to be alive

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

This song just sums up in a strange kind of way how I feel and how I felt during 2008.

Happy New Year!

.-

Thanks to Nic for making me believe in this song even though I used to hate it.

Better thank your lucky stars!

I’m going to start by saying I’m not a big fan of astrology, or in Sheldon Cooper’s words: “the mass cultural delusion that the sun’s apparent position relevant to arbitrarily defined constellations at the time of your birth somehow affects your personality.”

I don’t really think my dad believes in astrology, but there he is every week sending me whatever the astrologist from the Village Voice says about my sign. He justifies this weekly ritual by saying that even though he doesn’t really believe in it, the way this guy predicts your future through astrology is somewhat ‘cool’… And I have to agree.

So enough introduction, this is the astrological prediction for my future according to my sign:

GEMINI [May 21–June 20] According to John Gardner, there are two kinds of stories in literature: 1) You go on a journey; and 2) A stranger arrives in your world. According to my analysis of your destiny in 2009, you will reap rich rewards by including both plotlines in your life story. So let the brainstorming begin: What’s the best journey you could choose for yourself—a journey that will educate, challenge, and delight you? And what can you do to attract the best kinds of strangers into your world—strangers who will educate, challenge, and delight you?

Now I know that this year I will have to go and finally meet with all the people I met through the years via Internet… A long journey awaits for me. And for the strangers part… I guess I’ll have to finally get off my ass and join the circus, I bet I’m going to find so many strangers there or maybe… Maybe just strange people.

Oh! It’s Christmas Eve so I wish you all a Merry Christmas and ‘one of those hangovers‘, like my friend Lindsay Lohan would say.

Now that last sentence gave me an idea…

Continue reading ‘Better thank your lucky stars!’

[WordPress Tip] How to exclude children categories on a template

Yesterday I came across a problem while trying to get WordPress to show me only posts from the top level category without showing posts under sub-categories.

Let’s say I had a Category named Notebooks and under it there were Hewlett-Packard, Acer and Lenovo. Now what I wanted to do was to only display the posts that I published under Notebooks and not under Acer.

By default WordPress will show you the posts you published under Notebooks AND under Acer AND under Hewlett-Packard AND Lenovo, as if they were all posted under the same category (when I head to Hewlett-Packerd it will only show me posts under that category, of course).

After tens of hours of research (yeah), I found the function that could make my dream come true: is_category()

That function shows posts only from the category specified and NO OTHER ONE.

So if you want to modify a template to display posts only from the category you are calling and not display the posts from children categories (sub-categories), just change this:

<?php while (have_posts()) : the_post(); ?>

to this:

<?php while (have_posts()) : the_post(); if (in_category($cat)) { ?>

Then you have to change your endwhile:

<?php endwhile; ?>

to

<?php } endwhile; ?>

There were no direct answers to my problem on the WordPress Codex or anywhere else (that I could find).

A complete example:

<?php get_header(); ?>

<?php if (have_posts()) : ?>

<div class=”post”>

<h1><?php single_cat_title(); ?></h1>

<?php while (have_posts()) : the_post(); if (in_category($cat)) { ?>

<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class=”title”><?php the_title(); ?></a></h2>

<?php } endwhile; ?>

</div>

<?php else : ?>

<div class=”post”>

<h2>Not Found</h2>
<p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
<center><?php include (TEMPLATEPATH . “/searchform.php”); ?></center>

</div>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

This was done using WordPress 2.6.5