How to Create a Simple Related Posts Plugin
Your code looks ok at a brief scan of the code. What you need is a plugin header comment, some way to wrap it up and prepare it for output and a way to call it in your templates. Plugin comment: The minimum thing you need is /* Plugin Name: Your plugins Name */ Wrap … Read more