adds route handling for filtering posts