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

What I'd like to achieve is to

query for the latest post only for the selected category, and feature it on top of the thumbnails as a slideshow like the one from the homepage. *)

*) latest post in automotive for automotive category archive, latest post in architecture for architecture category, so on…

My beginner's hack from a few goolge search can be seen here.

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

Any help would be much appreciated.

1 Answer 1


The easiest way to do this is to simply make a category.php template file, that way you're not jamming everything into one template with multiple query's and conditionals.


It is unclear what you mean by "featured", do you want an url like http://example.com/portfoliography/architecture to have a select posts at the top? Or do you want the category page to feature certain categories above others?

  • That's right, I want a category archive to feature one (latest) post for each respective category.
    – willio
    Mar 7, 2012 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.