Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to List Category Posts in a WordPress Post or Page with Shortcode

Last updated on by
Elegant Themes
How to List Category Posts in a WordPress Post or Page with Shortcode

Have you ever found a need to list the posts from a specific category on a specific post or a page? In the past, we have used custom page templates and hard coded a solution in. However, recently we have discovered a way that allows you to list category posts in WordPress Posts or Page with a shortcode.

First thing you need to do is install and activate the List Category Posts plugin. Once you have activated the plugin, you can simply use the shortcode anywhere in your post or page.

The shortcode is [catlist] which accepts numerous parameters. First and foremost it accepts the category name or ID parameter. Example would be like:

[catlist name=tutorials]

If you want multiple categories, its best to use the IDs. The shortcode would look like this:

[catlist id=7,24,32]

The shortcode accepts bunch of other parameters including tags, orderby, order, numberposts, date, author, excerpt, excludeposts, comments, thumbnail, custom fields, etc. The full list of parameters can be found in the Other Notes section of the plugin.

The plugin also has a widget for the sidebar that you can use by going to Appearance » Widgets.

Download List Category Posts


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »

Comments

  1. Pranjal says:

    Hello, is there a way to list all of the categories in a single page?

  2. Umer Rock says:

    I want to list a specific Tag posts on a Page, is it possible

  3. gabriel says:

    Hi, Thanks for this plugin it works great if I use it in the cms. But I want to use it on a template and ‘hard code it i’ I tried [catlist name=list] or how can I get it to work on a normal php page?
    Thanks

  4. Dave Rozewski says:

    hey – i got it and it was really easy. Sorry to trouble you.

    dave

  5. Dave Rozewski says:

    Hey it worked! Thanks. However what would be really useful if I could show a category of posts only on one page. Maybe this does that and I don’t know how.

    anyway, thanks.

    Dave

  6. Brad Paterson says:

    This is great. I have the plugin installed and it works well and is much easier than coding custom pages. Would be great to have the posts shown in more detail (e.g. thumbnails, excerpts etc) as can be done with custom coding a page too. Anyone found an easy way to do this?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.