dynamically generate related posts in sidebar