Display The Recent Posts From A Specific Category

Prem Tiwari - - WordPress, WordPress Beginners, WordPress Snippets

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.

About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.