• Ok, so I’ve been browsing the forums now for a while, and I’m most definitely still confused.

    Basically, I want to have a link in the sidebar to the most recent post of a specific category. Everything here seems to point to using list_cats and excluding all the categories you don’t want, but why does it have to be so hard???

    I just want a link to category 2. I don’t want to have to manually exclude 1,3,4,5,6,7….20. I want to include 2. Make sense? That way, when I add yet another category I don’t have to go back into my code to add 21 to my exclude list.

    Basically, I’m trying to add a “Daily Photo” section to my blog (as is done on http://www.dooce.com), that links to the most recent picture I’ve posted.

    So how do I get that link to my “Daily Photo” category?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter adgriffi

    (@adgriffi)

    Hmm. Is there really no one else out there that wants the link to the archive of a specific category (without having to use exclude)?

    I really expected this to be general functionality.

    I should look into learning how to write a plugin…

    I wish someone would answer this.

    Try the following:

    <a href="<?php echo get_category_link( $daily_photo_cat_id );?>"><?php echo get_the_category_by_ID( $daily_photo_cat_id );?></a>

    Where $daily_photo_cat_id is the ID of your Daily Photos category.

    Or, much more simply, use the coffee2code plugin.

    but what about pulling a thumbnail into that listing too?

    Well, that ain’t what you originally asked :).

    I detail how I did my “currently reading” section here using the aforementioned plugin. (You have to visit the homepage to see the currently reading section by design).

    Sorry, I actually made a post myself saying what I wanted.. I just saw that this person had asked for similar. My post was made about an hour ago, if you want to see it just scroll down the list for today.

    I’ll check it out, thanks again.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Retrieve link to specific category?’ is closed to new replies.