This is a little bit more complicated than I thought.
But I did find this link Which should help you on your path. Minus the custom post types, the code should be what you are looking for.
This is a little bit more complicated than I thought.
But I did find this link Which should help you on your path. Minus the custom post types, the code should be what you are looking for.