Added type() function

Needed a way to take a specific type of posts (ie. 'regular' versus 'link' versus' image').