I’m pleased to announce that the latest version of Cover for WordPress is available for download.

Download from WordPress.org Download from GitHub

This version has been quite some time in the making. It started out as a bug fix, but I’d wanted to add support for a few plugins, so it turned into a bug fix and a feature upgrade.

Bug fixes

You never make mistakes, right? Yeah, me neither.

There were a couple style changes to the featured post slider. One fixed a bug where titles, instead of wrapping, would just get cut off after the first line. The second fix is a little more complex.

Although the slider’s functionality is driven by JavaScript, its links should all be accessible even with it disabled. To that end, I originally wrote the slide styles to make them stack. That, however, had an unfortunate side effect: the page would jump when the JavaScript ran, creating the slider.

I rewrote the pre-js slider styles so that it looks just like the slider, except instead of paging, the entire thing just has a scroll bar. When the js loads, it replaces the scroll bar with appropriate paging. No page jump whatsoever.

It was brought to my attention by a user that not all nested menus were being given their little expand-collapse icon, so I fixed that too. (It was just a specificity issue, solved by a one-line change in the js.)

Adding support for plugins

I’ve added support for four plugins: AMP, Algolia, YARPP, and Featured Video Plus.

AMP

AMP is Automattic’s own plugin which adds AMP support for WordPress blogs. There wasn’t much I had to do for this one, but I wanted the header bar to inherit the same color that Cover lets you pick in its Customizer settings.

Algolia

Algolia is a hosted search provider. I first noticed their autocomplete search functionality on the website of another resource of Cover’s, Font Awesome. They do have paid plans, but their “Hacker” free plan is perfect for my smaller site.

Cover’s search is a little bit different than most sites’, being tucked away in an overlay, so I wanted to build a custom template for it. While I was at it, I also built a custom template for the plugin’s instant search page. (I don’t use it myself, but someone else might.)

Yet Another Related Post Plugin

YARPP, for short, is just what the name says. It provides a few default templates, but (are you sensing a theme here?) I prefer to roll my own. There are two grid templates, for displaying related posts in two or three columns across; two slider templates, similar to the featured post slider, one normal width and one full width; and two normal templates, for displaying post titles in a comma-separated or a bullet-pointed list.

Featured Video Plus

The ability to set a featured video — as opposed to a featured image — was requested, and really, this could have gone a couple different ways.

Cover already supports post formats, of which “video” is one. My first thought was to programmatically grab the first video in a post, and if the post itself was a video format, display the video in the header.

But then I thought, why restrict it to the video post format? Better to allow any post format (and I don’t really use them on my own site). That’s getting into functionality, not presentation, and that’s plugin territory anyway. A little research brought my to the Featured Video Plus plugin, which already provides all the functionality I need. It doesn’t play too nicely with Cover, so I had to add support for it.

You can see this functionality in action on this post.