So just getting back to this, sorry about the delay. I have read through most of your case studies and they are all excellent, thank you. But they all say 'add xyz to your themes functions.php file" More my question is how do you add this to a standalone plugin.
If I add a custom post type for foo and a taxonomy bar I want to be able to display the single for foo, archive for foo and bar.