Five Beers: A Free AJAX-Powered Child Theme for Twenty Fifteen

photo credit: rchlnwnhm - cc
photo credit: rchlnwnhmcc

WordPress 4.1 hasn’t yet been officially released, but child themes for the new Twenty Fifteen default theme are already popping up. The minimalist, blog-focused theme has so far been well received and users are already eagerly testing it out.

WordPress developer Chris McCoy has created a Twenty Fifteen child theme with a unique twist. At first glance, Five Beers appears to be a colorless variation of the default theme, but under the hood you’ll find a set of powerful AJAX additions.

five-beers

One of the most impressive features is the way Five Beers handles media display. It incorporates the Strip.js lightbox to slide images and videos out from the side of the page. You can see a live example of it on the Five Beers demo site.

The child theme includes all of the customization options of Twenty Fifteen plus several extra features:

  • AJAX Live Search (still working out the bugs)
  • AJAX comments
  • AJAX archives
  • AJAX A-Z Alphabet post loading
  • AJAX infinite scrolling with SEO as a factor
  • Custom tag page listed by letter
  • Lightbox to adapt to galleries and video oEmbeds
  • Unlimited widget area creation

Additionally, when you publish a YouTube or Vimeo link, the theme will use the cover image (click to play) as the featured image. If no featured image is set, Five Beers will use a default click to play thumbnail.

Building all of this functionality into the theme is a bit unorthodox, as most theme authors would opt to put these items into separate plugins. I asked McCoy why he opted to do it this way. “I’m trying to keep all functionality as the theme, because I prefer not to use a plugin if I don’t need to,” he said. If you use the theme, you could opt to use McCoy’s Strip Lightbox plugin instead and then simply remove the include in the functions file for the lightbox.php file.

Ultimately, it’s a theme McCoy built for himself one night while having five different brands of beer, hence the unique name. I’d like to see each piece of functionality pulled out and supported as a separate plugin, but this isn’t something he intends to do. McCoy originally planned to create it just for himself but will be adding more features next week.

This child theme is particularly useful if you want to highlight your archived content by including alphabetical sorting and live search, making it easy for users to discover content as they are typing.

Five Beers currently requires WordPress 4.1 Beta 1+ to use until 4.1 is officially released. The WordPress 4.1 project schedule has the release targeted for the week of December 8. McCoy does not plan to add the theme to WordPress.org, as the Strip.js licensing is not supported in the official directory. You can download the Five Beers theme for free on GitHub.

11

11 responses to “Five Beers: A Free AJAX-Powered Child Theme for Twenty Fifteen”

  1. Cool theme, just be careful because ajax breaks most plugin functionality. Hopefully plugin authors will add more support for ajax as themes like this become more popular.

      • I’d agree with Scott that there can be issues using Ajax in WordPress. . .

        When plugins conditionally enqueue javascript to certain page templates, or to enqueue only when a shortcode is present, etc. . .and the page is loaded via AJAX, the JS from the plugin isn’t enqueued and doesn’t run. . .also, you’ll see a lot of plugins that use $(‘.selector’).click(); rather than $(‘.selector’).on(‘click’, function(){}); so the event doesn’t appropriately work when the content is loaded via AJAX.

  2. Waiting for this theme eagerly as some of the feature shown in the demo version looks very promising and they will surely going to change the whole theme industry very soon. It a timely reminder for all those who are in this industry.

    • I’m envisaging a lot of really nasty implementations of this sort of thing though. This particular example is beautifully clean, but I’m guessing others will take this too far and AJAXify and animate way too much stuff.

  3. Did a small update, can now pick between left and right sidebar in the customizer, added scroll to top icon when scrolling down the screen, also updated the lightbox to a newer version.

  4. I’ve noticed a bug with the theme. If you try to use the search widget, the pagination doesn’t appear in the search results and and you get this: Fatal error: Call to undefined function the_pagination()

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: