You can learn from WordPress Codex to modify the source the way you want as I learned from there too.
What I did was modifying flexible-posts-widget.php
directly. I added a query filter to WP_Query
object in the widget
function. I can send you the code but you may want the way you like it.