there are several tutorials on how to create your own widgets, in this case all you really want to do is copy the recent posts widget and modify it appropriately to choose the correct post_type.
you can copy the code from wp-includes/default-widgets.php
search for:
/**
* Recent_Posts widget class
*
* @since 2.8.0
*/
copy everything between that and:
/**
* Recent_Comments widget class
*
* @since 2.8.0
*/
paste it into your functions.php for your theme (or another file which you include), and make the appropriate modifications.
Thread Starter
norrie
(@norrie)
Thanks luckdragon but being new to wordpress, I can’t find the post_type I need to change amongst all that code. Any chance you might be able to point it out?
when you click on “portfolio” on your admin menu it should take you to a url like
wp-admin/edit.php?post_type=<something>
whatever that <something> is, is the post type you need.