There’s a simple choice that comes up over and over again in the business of building content-publishing websites: curation vs. automation.

When I say automation I’m talking about things that just work on their own: social media feeds populated via external APIs, new articles that appear on the homepage as they are published or a list of the most popular posts pinned to the sidebar.

While automation is easy and usually the default, it leaves a lot to be desired from an editor’s standpoint. A long form story with gorgeous photography shouldn’t immediately get pushed below the fold by a recap of last night’s episode of “Game of Thrones”. Editors might want to draw particular attention to big stories or surface relevant content from their archives to respond to current events. This is where curation comes in, and the ability to cherry pick individual content pieces and organize them on a page becomes really helpful.

To make this easier, we created a WordPress plugin to help web editors balance the need for curation and automation. The tool, dubbed Stream Manager, is designed to give editors full control over their homepage without sacrificing the ease of automatically pulling in new content.


How it works

Here’s how it works: logged-in users manage ‘streams’ of content, from which posts can be added, deleted, or moved around via a drag-and-drop interface in the WordPress admin. Posts automatically show up at the top of streams as they are published, and can be ‘pinned’ into a fixed spot in the stream (like the third post down). Take a look:

So if you want to highlight a few pieces of especially awesome content but leave the rest of the rest of the page populated in reverse chronological order, you can pin the posts you want to keep and the rest of the stream will continue to be updated automatically and just flow around your pinned posts.

How to use it in a Timber theme

On the PHP side, initializing a stream on a page is as simple as this (Stream Manager is designed to work with the Timber Library):

index.php

$context[‘stream’] = new TimberStream(‘homepage’);

index.twig

{% for post in stream.get_posts %}
   {{ post.title }}
{% endfor %}

Stream Manager in Use

We’ve used Stream Manager on a bunch of our own projects, most notably Hechinger Report and The Trace. Lots of developers have made great tweaks along the way to fill the needs of each individual project.

TheTrace.org’s homepage, powered by Stream Manager

You can use it!

Earlier this year, with the addition of some test coverage and a sweet logo, we released Stream Manager to the WordPress.org plugin repo. Streams for all! If you’re interested in what we did (or have ideas on how to do it better), check out the project on Github and give it a try.