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.
They all uses a single archive.php, and it works wonderfully to display category-specific images. See the current code here: http://pastebin.com/1vVrMF28
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: http://pastebin.com/p4qXnDtN
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.