How to specify the categories that are displayed in your recent posts widget
So here it is! My first WordPress plugin. It’s a really simply plugin that adds an extended version of the recent posts widget. The extended version adds the ability to specify either categories to include or exclude from a list of recent posts. I developed this plugin for ambercouch.co.uk so I could display only recent post from the news category in the news section of the site.
Download: wordpress recent posts extended widget
Installation instructions:
- Download and extract the plugin
- Upload wpdc_recentposts_extended.php to your plugins directory eg. /wp-content/plugins
- Activate the plugin in the plugins section of you admin page
- In your widget section you will now have a widget called Recent Posts Extended which you can add to any of your sidebars
- Add the widget to a sidebar and click edit
- There are 3 options which you can change Title, Number of post and Category number
- In the ‘Category number..’ field enter a comma delimited list of the categories you want to include eg. 1,5,6,23 or if you want to exclude categories use negative numbers eg. -1,-5,-6,-23
