Fast Post Lists provides additional shortcodes to include a list of posts within another post or page. Key features are:
- Filter posts by a search query
- Filter posts by category, via an inclusion or exclusion list of categories
- Filter posts by tag, via an inclusion or exclusion list of tags
- Order posts by a post field of your choice
- Limit number in list, e.g. to show 10 most recent posts
- Group posts by category or tag, with subheadings displayed for category or tag
- Full control to configure list CSS styles, HTML per post and HTML at start and end
You can download this plugin from WordPress.org, or install it directly from within your WordPress Plugins page by searching for “fast post lists”.
The options page allows you to manually enter some HTML to include at the start and end of the list, plus the exact format of each list item. Additionally CSS styles can also be added through the options page as required. The configured HTML per post uses a number of key values that will be substituted with data from each post. These are:
- [title] – the post title
- [permalink] – the post’s permalink
- [img] – the first image attachment for the post (if any).
The shortcode to use in your posts or pages is:
By default this will query all posts and sort by post title.
Below are some examples as to how each of the parameters can be used:
List only posts that match the search keyword ‘stuff’
List only posts that match the search keyword ‘stuff’ but don’t have the keyword ‘rubbish’
[fu_postlist search=’stuff -rubbish’]
List only posts within the single category ‘Spiders’
A single category can be listed by name or by id.
List posts within the categories Spiders or Dogs
List posts within the categories Spiders and Dogs
List posts not within the categories 10 or 12
Categories to exclude must be listed as a comma separated list of id’s.
List posts with either the tags ‘rain’ or ‘shine’
List posts with both the tags ‘heavy’ and ‘metal’
List posts without the tag ‘trouble’
Limit the number of posts listed to 10
A value of -1 or the parameter omitted entirely mean all.
Group posts by category. The category name will be inserted as a subheading at the start of the group
Group posts by tag
Order posts by post title (default behaviour)
However you may order by ‘ID’, ‘author’, ‘name’ (post slug), ‘date’, ‘rand’ etc.
Of course you can mix an match many of these parameters to your hearts content.