Welcome Guest! Login? Checkout

Recently I’ve been working on getting a presentation ready for WordPress Leeds. Unlike previous presentations I make, this one has been prepared well in advance, with me taking advantage of Cyprus airports’ generous WiFi hotspots and also pool time.

The presentation is on Aesop Story Engine, a plugin I discovered fairly recently thanks to working with a client who recommended it to us. Whilst it does the job and is relatively easy to set up, it isn’t without it’s problems.

One such problem manifested itself when I was writing the plugin – it’s strange incompatibility with TwentyThirteen. Often (and to be fair, they do warn you), the changes are merely CSS changes. However there can be some other changes that need to be implemented.

The Problem – Aesop’s Chapter Component is Hidden

Probably one of the most useful component for Aesop is the “Chapter” component. What this component does is allows you to split your content up into Chapters, in an attractive way, with the possible addition of a background image or a video. It adds on to the sidebar a sticky menu, allowing navigation of the content, as you can see in this example below with the tag icon to the right of the content.



The problem occurs is that in some themes, TwentyThirteen included, is that the menu for the chapter component is often missing, hidden away, and no real clue as to what the issue is.

The Reason This Occurs

After doing a bit of research, it’s due to Aesop classes not being added correctly onto content. I’m not sure why this happens, but Aesop is looking for the aesop-story-entry class in the page. If it isn’t there, it has no idea where the Chapters start or end.

The Fix

The fix is straightforward, thanks to the fact that Aesop Story Engine has a number of filters available which you can read about here. The one we will be using is aesop_chapter_scroll_container, which will allow you to change the name of the scroll container class name so Aesop can find the chapters.

The Code

To fix it, simply add this to your theme’s functions.php. I recommend doing this in the theme rather than a separate plugin, as this is largely theme dependant code. The only way I wouldn’t include this in a theme’s functions.php is if the theme is public, and could be updated.

This works with TwentyThirteen. Please check your theme to find out what the content wrapper is called and replace “.entry-content” with your content wrapper’s class name.

Please also note that it includes the dot, to signify it’s a class. I guess you can use it for ID’s too, but I’ve not tried it.

Anyway, I hope you find it useful!



    Comments are closed.