Another web design post about something that I think sets my site apart from others, my lesson plan formats. I really struggled adding custom post templates to Twenty Fourteen/Sequel so I thought I would share my solution here in case any one else has been suffering as I have.
The Twenty Fourteen theme claims that all you have to do is add a file called content-name of custom post type.php to your theme or child theme file and the theme will use that to display your custom post type. I found that that did not work. I ended up having to create a single-name of custom post type.php file just like in every other theme. However then came the problem of mashing up the single.php file and the content.php file to get it to work right. This took a great deal of care, perhaps because the last time I really dug into a template file like this, the coding was much simpler.
Now there’s a million arrays and variables and the word ‘twenty fourteen’ is everywhere–does that actually do something?
Anyway, I am sharing my single-lesson.php file with you so you can take a look and figure out how to add content in yourself. Now I’m doing this partly because I have some big plans to move beyond this template and create something much more elegant and unique. But I do this helps people who ran into the same frustrations I did.Liked this post? Check out some of my books on