Writing a custom WordPress filter to insert related post links into post content