I have a page that I would like to show one posts from just one specific category. I'd then like a function to search the posts within this one category on just this page. I don't mind how it's searchable tag or otherwise, but I want to only bring up seatch results from that one specific category.


1 Answer 1


This would help you to fetch a single post from a specific category.

$args = array('post_type' => 'post', 'posts_per_page'=> 1, 'cat' => get_cat_ID('Category Name'));

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.