Display The Recent Posts From A Specific Category

| Last Updated: | In: WordPress, WordPress Beginners, WP Labs

While developing of WordPress websites for clients or companies, sometimes we need to get the recent 10 or 5 posts from a specific category. One of my blog reader has asked this question by using my request tutorial form from FreeWebMentor.com.

Today, I am creating an article to help him as well other WordPress enthusiasts. This tutorial will help you lot, so keep your close attention in this tutorial as I am going to share how to display the recent posts from a specific category in WordPress.

display recent posts specific category wordpress

Display The Recent Posts From A Specific Category

Use the below simple code in your theme’s template file OR custom template file where you want to display the recent posts from a specific category. Change the category id from which category you want to display the posts. In below code WP_Query( 'cat=3&posts_per_page=10' ), I have used cat=3. 3 is my category id.

Over to You

I hope this tutorial helped you to fix to upload large image files in WordPress. If you still need any help, feel free to add your comments in below comment section. I will be happy to help.

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials and also don’t forget to subscribe my blog to get all future tutorials directly in your mail box.

Tags: , , , , , , ,

About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.

You may also like:

Get Free Access of 500+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...


Free WordPress Setup Service

Free WordPress Setup

Want to Setup WordPress Blog Setup? I will help you in the setup of your WordPress blog.

Click Here

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...