Plugin / List category posts

Fernando Briano

Description

Description

List Category Posts allows you to list posts by category in a post or page using the [catlist] shortcode. When you’re editing a page or post, directly insert the shortcode in your text and the posts will be listed there. The basic usage would be something like this:

[catlist id=1]

[catlist name="news"]

The shortcode accepts a category name or id, the order in which you want the posts to display, and the number of posts to display. You can also display the post author, date, excerpt, custom field values, even the content! A lot of parameters have been added to customize what to display and how to show it. Check the full documentation to learn about the different ways to use it.

The [catlist] shortcode can be used as many times as needed with different arguments on each post/page.
[catlist id=1 numberposts=10]

There’s an options page with only one option -for the moment-, new options will be implemented on demand (as long as they make sense). Right now the only global option is the numberposts parameter, to define a default number of posts to show for each instance (you can override this value by using the numberposts parameter in your shortcode).

Read the instructions to learn which parameters are available and how to use them.

If you want to List Categories instead of posts you can use my other plugin List categories.

You can find Frequently Asked Questions here.

Customization

The different elements to display can be styled with CSS. you can define an HTML tag to wrap the element with, and a CSS class for this tag. Check the documentation for usage. You can also check this nice tutorial which gives lots of tips and how-to’s to customize how to display the posts.

Great to use WordPress as a CMS, and create pages with several categories posts.

GUI

Klemens Starybrat has created a GUI for List Category Posts. It helps you create a shortcode from a nice visual interface in WordPress’ text editor. Check it out:
GUI for List Category Posts

Widget

Since WordPress 4.9, you can use shortcode in text widgets. So you can just add a text widget in Appearence > Widgets and write the List Category Posts shortcode.

The plugin also includes a widget as a simple interface for its functionality. Just add as many widgets as you want, and select all the available options from the Appearence > Widgets page. Not all the functionality in the shortcode has been implemented in the widget yet. You can use the shortcode for the most flexibility.

Please, read the information on the wiki and Changelog to be aware of new functionality, and improvements to the plugin.

Videos

Some users have made videos on how to use the plugin (thank you, you are awesome!), check them out here:

Support the plugin

If you’ve found the plugin useful, consider making a donation via PayPal.

Development

Development is being tracked on GitHub. Fork it, code, make a pull request, suggest improvements, etc. over there. I dream of the day all of the WordPress plugins will be hosted on Git 🙂

Since the documentation on how to use the plugin has passed wordpress.org’s character limit, the text was cut. I’ve since started using a wiki for more comfortable reading and maintaining. Please check it out, suggestions are welcome on GitHub issues!

Instructions on how to use the plugin

Below you can find common shortcode use cases. You can use the shortcode while editing posts, pages, custom post types, text widgets and in all “page builder” plugins that support shortcodes.

Read the full documentation to discover many more features, including:

  • advanced post selection options (by date, search terms, custom fields, post types, custom taxonomies and more)
  • output customizations (show each post’s date, author, excerpt, thumbnail and more)
  • custom templates of your own design, based on a simple PHP example

List 10 latest posts:

[catlist]

The default number of listed posts is 10, to modify it you need to specify numberposts parameter:

[catlist numberposts=15]

List posts from the “Dogs” category:

[catlist name=Dogs]

List posts from the category with id 2:

[catlist id=2]

By default only the “post” post type is included. To list pages use:

[catlist post_type=page]

and for both posts and pages:

[catlist post_type="post,page"]

If we combine the above options we can get a shortcode that lists 15 items, including post and pages, from the “Dogs” category:

[catlist name=Dogs post_type="post,page" numberposts=15]

Most of the parameters you will find in the documentation can be used together.

The plugin can detect current post’s category and use it for listing:

[catlist categorypage=yes]

Same goes for tags:

[catlist currenttags=yes]

To show each post’s excerpt use:

[catlist excerpt=yes]

If you want to show the date, author and comments count next to each post, use:

[catlist date=yes author=yes comments=yes]

You can specify html tags and classes for many elements. Let’s modify the previous shortcode and wrap dates and authors in tags and classes of our choice:

[catlist date=yes date_tag=span date_class="my-date" author=yes author_tag=p author_class="my-author" comments=yes]

Read more about this feature

You can order posts by date:

[catlist orderby=date]

You can also use title, author, ID. More options are described in the documentation.

The plugin also supports pagination. You need to specify numberposts to tell the plugin how many posts per page you want:

[catlist pagination=yes numberposts=5]

See the wiki: Pagination for more information.

Please read the full documentation for detailed documentation of all plugin features, use cases and shortcode parameters.

Ratings

4.7
226 reviews

Rating breakdown

Details Information

Version

0.81

First Released

07 Nov, 2011

Total Downloads

2,557,798

Wordpress Version

3.3 or higher

Tested up to:

5.2.4

Require PHP Version:

5.4 or higher

Tags

Contributors

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.