For a long time now there has been a huge need for a sidebar widget that allows you to choose from any WordPress post type to show a list of the latest posts in the sidebar.
I've created a fully customizable sidebar widget for doing just that, packed up as a plugin for you to use now!...
Finally, Just What We All Needed!
If you've been using WordPress custom post types at all on your site, like I have been now for about 10 months or so... since 3.0 Alpha version, then you'll probably love this.
I've created a new custom sidebar widget for WordPress, to display the latest posts for other post types besides the 'post' post type. This widget actually lets you show not only custom post types, but you can choose to display content from any public post type which includes the built-in post types 'page' and 'attachment', and of course 'post'.
So as long as your custom post types are publicly available, you can display the latest posts for them in your widgetized sidebar areas. What I mean when I say public, that means you must have specified in your code when registering your post type the property 'public' => true in the $args array which you must set up when you use register_post_type().
Since I don't use custom post type plugins I don't know if you have that capability to set 'public' => true or not. I assume you would be able to, but I'm not sure.
This plugin is similar to another plugin widget I made and recently released for showing your latest Tweets. It simply adds a new custom widget to your Widgets page in the WordPress dashboard, which you can use in your widgetized sidebars.
I have yet to see or hear about anything like this which displays the latest published custom post type posts in your sidebar. It's a replacement for the well-known Latest Posts widget which only displays the latest posts from the 'post' post type, and that's it.
Features Built Into this Plugin/Widget
- Ability to choose which post type to display the latest posts from.
- Able to control the heading HTML tag for formatting the widget title depending on how your theme displays the headings of widgets.
- Control the number of posts to display.
- Customizable widget title text.
- Full localization of text to support use with non-English languages.
- Link to view all posts from XXXX post type, whichever it is you have selected to display.
You will need to Download the n2wp-latest-ptypes.zip file.
- Unzip the folder `/n2wp-latest-ptypes/` to your computer.
- Upload the entire contents of `/n2wp-latest-ptypes/` to the `/wp-content/plugins/` directory of your WordPress installation.
- Activate the plugin through the 'Plugins' menu in the WordPress dashboard.
- Go to your Widgets panel in the dashboard, and drag the New2WP Latest Custom Posts widget to your sidebar, and configure the settings to your liking.
If you like this, you might like some of my other crappy plugins that I've made.
You can see this widget in the sidebar right here showing Latest Snippets →
Let me know what you think of it in the comments, and if you find any bugs please tell me so I can fix them. I really like this widget myself, and would like to get it added to the WordPress plugin directory if I can.