fix queries to retrieve related posts and linking posts. post_type was set wrong