Fixed the "related project" function

But still need to move this to functions.php