Display Recent Posts in WordPress

Many times we need to display recent posts on side bar or content page of WordPress blogs. If it is for side bar, we can use existing widget to display recent posts. But for content we need do some PHP code modification. You can use this code on any play where you want to display recent posts

Add recent posts in WordPress with PHP

So Here I am adding some ways to display recent posts on WordPress

Display Only Title of Recent Posts

If you want to display only titles of recent posts, you can use following code where you want to display the posts.

Here number 10 represents the number of post which you want to display.

Displaying Recent Posts with Summary

Sometimes, we are interested in showing post summery along with the titles of recent posts. For this, we can use following code.

Here you can change the number 250 to any number. It represents the number fo characters of summery that will be displayed along with the title of recent posts.

If you think there are more easy ways to show recent posts on the page, you can share with us.

If you like this post, share it with your friends on various social media websites.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest updates, web design resources and tools.

You have Successfully Subscribed!

About The Author

  • ADD YOUR COMMENT

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Receive fresh web design resources and SEO tips in your email by our weekly newsletter

You have Successfully Subscribed!

Pin It on Pinterest

Share This

Share This

Share this post with your friends!