obviousity's posterous

obviousity's posterous

Casse No-i  //  The unfiltered ramblings of a 20-something designer/dev with a bad case of the people-watchies... a girl who just needs to get it off her chest once in a while.

Archive for

January 2010

Jan 25 / 1:12pm

Best. Resume. Ever. NOW With Pictures!!

I can't make this up.

Our VP just walked in, claiming WebKing must have an illegitimate son, and that we just received this ... uhm... work of portfolio genius?

I'm half tempted to contact the kid myself, on the DL. Take him under my wing as a charity case. I don't know. I haven't seen something like this since I co-produced the Burrito-Nightly-Monthly on my AOL homepage 12 years ago. (Hey, we all start somewhere - let it go.)

Sweetheart, 1994 Called. They Want their MSPaint Masterpiece Back. No Questions Asked. Just. Give. It. Back.

... I don't know.  The mean part of me can't stop laughing (I didn't actually believe we *actually* just received this, just now. Like. In 2010) And the mothering part of me can't help feeling really. really. really. Bad.

Really.

And the mean part is winning.

But enough of the rambling.

Here it is. The Best Resume Ever:

(download)

Jan 19 / 1:40pm

Custom Thesis Page & Post Navigation: Filthy Easy Awesome

WARNING: This post assumes you have a working knowledge of php, HTML, CSS, and Wordpress/ Thesis functions and hooks. The following contains as-is code you are free to use AT YOUR OWN RISK. While I can assure you it works where I've used it, I make no disclaimer, warranty, or guarantee of its viability in your installation.

I'm currently finishing up a heavily modded Thesis Wordpress site for a client. Can't wait to release the link, but in the meanwhile, I want to share a little hack I wrote to change the default "Previous" "Next" archive/ post/ etc links that come loaded by default. In the process, my client also wants the single post pages to navigate between other posts in the same category ONLY, and for both sets of navigation to read the same (by default one uses post titles while the other simply "previous" and "next" text)

I looked around for solutions but what I found was either too much or too little of what I needed. So, naturally, I set out to write this myself ...  A little swearing, voodoo magic, and some heated digging about the interwebs allowed me to kill all strange birds with one nimble stone. I'll explain more after I hand over the ugly...

Here's What You Do:

Drop this into your custom_functions.php & change the function parameters in red to how you'd like your links to read.  If you're not sure what to do about those parameters, then refer to this post on Wordpress navigation for starters:

    //BEGIN CUSTOM POST & PAGE NAV

    remove_action('thesis_hook_after_content', 'thesis_prev_next_posts');
    remove_action('thesis_hook_after_content', 'thesis_post_navigation');
    add_action('thesis_hook_after_content', 'nav_posty');


    function nav_posty(){
        ?>
            <div class="prev_next post_nav">
        <?php if(is_single()){
        ?>
                <p class="previous"><?php previous_post_link('&larr; %link', 'Read More', TRUE); ?></p>
                <p class="next"><?php next_post_link('%link &rarr;', 'Go Back',TRUE); ?></p>
            <?php
        }else{
            ?>
                <p class="previous"><?php next_posts_link('&larr; Read More'); ?></p>
                <p class="next"><?php previous_posts_link('Go Back &rarr;'); ?></p>
            <?php
        }
    ?>
    </div>
    <?php
    }

    //END CUSTOM POST & PAGE NAV

This is Why it Works (The Abridged Version):

First things first. 2 remove_action() calls remove the default single post and archive/index nav from the hook thesis_hook_after_content. The following add_action() places nav_posty() into the hook where those original functions used to be.

When it needs to, nav_posty() determines with a simple conditional statement whether or not the page in question is a single post or part of an index/archive and "does different stuff" depending on what it finds. It then uses HTML + built-in wordpress nav functions to output the proper links. For this particular exercise, I retained the default containers and classes so I didn't have to completely rework my formatting on the links ...

OK, Now Go Break Stuff

I mean.

Have fun trying out my filthy awesome code!

Hope you get as good use from it as I know I will. Bust it up, add images or blinking kittens, I don't mind!  At the very least, I hope it helps you along your path to custom Thesis navigation enlightenment.


 

Filed under  //  code ugly   php   thesis   wordpress