Support » Plugins » Query post for 'selected category' in archive.php

  • I’m trying to figure out how to display a ‘featured post’ on a selected category archive.

    My website uses the category-based navigation for different types of posts (text only post–blog, and image only gallery post), and is driven by a single custom archive.php.

    Homepage: http://portfoliography
    Auto gallery:
    Architecture gallery: http://portfoliography/architecture
    (… and so on)

    They all uses a single archive.php, and it works wonderfully to display category-specific images. See the current code here:

    What I’d like to achieve is to query for the latest post only for the selected category (latest post in automotive for automotive category archive, latest post in architecture for architecture category, so on…) , and feature it on top of the thumbnails as a slideshow like the one from the homepage.

    My beginner’s hack from a few goole search produces the following:

    But the said code generates a slideshow using images from posts in every category.

    Any help would be much appreciated.

  • The topic ‘Query post for 'selected category' in archive.php’ is closed to new replies.