• Not sure if this is the correct place to ask this but…

    Hi, I’m working on some Custom Post Types and they are coming along very well :). But of course everything can’t go smooth, and I have now hit a bump in the road.

    My question now is;

    How do I show a post from one specific taxonomy from a Custom Post Type in such as the footer.php?

    This is maybe not explained very well, so I shall try to explain it clearer for you.

    Let’s say I have made a Custom Post Type with the name Quote and a Taxonomy with the name Genre (Taxonomy = ‘hierarchical’ => true, this make it behave like a category). Inside Genre I make two “categories”; One with the name New and the other with the name Old. Like this:

    Quote
    – Genre
    — New
    — Old

    This works beautiful on the page, but it’s when I try to get the newest post from each of these “categories” to show in my footer.php that things don’t work anymore.

    I have done almost exactly this before and it have worked grate, but then I used the regular Categories, this was the code  used then:
    <?php query_posts(‘category_name=stallnytt&showposts=1’); ?>

    So how do I get my newest post from the taxonomy Genre; New and Old?

    This is maybe as easy as categories but I can’t figure this one out and would really appreciate it if someone could help me with this :).

    I hope I have explained what I’m after clearly enough, my English (writing) is sadly not the best.

The topic ‘Custom Post Type & Taxonomy ?’ is closed to new replies.