Refactored code so that the title filter is added/removed from within the 'related_posts' class