Related Stories comes to GothamSchools

Over the last few days, I’ve been working with the GothamSchools editors to come up with a way of displaying related stories to readers.  Here is what we’ve come up with:

To accomplish this I started with the same related posts plugin we use on Streetsblog: Yet Another Related Posts Plugin.  This is really an excellent plugin that crunches masses of data to come up with a useful list of related posts for any given post.  By default, it can show this list at the bottom of a post before the comments, or in a sidebar widget.  We soon decided that we didn’t like these options and instead crafted a widget that floated within the story itself.

I did this by searching for a “more” tag within the content of the post using the WordPress the_content filter.  If it exists, I inserted the widget there so it appears mid-way through the post.  If it doesn’t exist, then I float the box at the bottom of the post.

Occasionally, we have stories that are composed of images and videos such that the “Related Stories” box would not fit anywhere nicely.  In this case, I made an option to turn off the box entirely for that post:

Unfortunately to accomplish these modifications, I had to edit the plugin code directly. This will make upgrading more difficult. Perhaps the plugin author may want to incorporate some of my modifications into future releases of the plugin. For that reason, I point to the code.

2 Responses to “Related Stories comes to GothamSchools”

  1. Chris Abraham Says:

    After some conversation with @themitcho (, the plugin author, I managed to move my plugin modifications to and to return the plugin to its original state. Thanks to @themitcho for the help and the plugin.

  2. vhamer Says:

    Thanks for writing about this update. I noticed the Related Posts boxes today and meant to ask you how new they were. I like how they’re visually integrated.