The Category Listings plugin has been developed for a WordPress site that needed to display the titles and excerpts of the most recent posts for the post that is currently being viewed. The idea being that it promotes other related posts to the readers.
Download Category Listings Plugin
The plugin outputs the most recent posts from the category of the post that is currently being displayed. It is possible to configure the number of posts to be output, the HTML before and after the whole of the output, the HTML before and after the post title and the HTML before and after the post excerpt.
To get the Category Listings to display, you will need to either:
- Place the shortcode ‘category-listing’ where you want the output to appear in your post. Usually, this would be at the end of a post.
- Place the following code in your theme
<?php echo output_category_listing(); ?>. We have placed it only where we are displaying a single post and positioned it between the end of any post paging and before the comment form.
The category listings have the following configurations that are set in the Settings->Category Listings admin page:
- Number of posts output – The number of posts that will be shown.
- HTML before all output – HTML that will be output before the generated output.
- HTML after all output – HTML that will be output before the generated output.
- HTML before post title – HTML that will be output before the post title.
- HTML after post title -Â HTML that will be output after the post title.
- HTML before excerpt -Â HTML that will be output before the post excerpt.
- HTML after excerpt -Â HTML that will be output before the post excerpt.
We have a wish list of how we would like to develop this plugin if we need to:
- Make it work with the <!–more–> tag instead of having to use excerpts.
- Widgetize it so it can be placed in a sidebar or footer. Although for this, we plan to only show the
For an example of how it looks, you should see the most recent posts published in the Plugins category between the end of this post and the start of the comments. Why not check out the other plugins we have?
What do you think could be done to improve this plugin or make it more useful?
Downloaded ! would try and see the ouput as have images and videos at top of post
@AKo – Sorry, I should have mentioned in the post that it is working right here. You should be able to see other posts from the Plugin category listed between the end of the post and the start of the comments.
I’ll try and get some images up later today.
Thanks for the comment,
Dominic.