Closed lhermann closed 6 years ago
This happens when you pass an empty string as a template name. We have to additionally check for an empty string.
template(['single', '']);
For now, I would recommend you to create a post type specific controllers or check for an empty string at get_query_var
.
Thanks for the greatly exemplary bug report :)
Fixed with tonik/gin:v2.0.3
release
Thank you for this quick response. Applied the update and can confirm that it is fixed!
Hi guys, thank you first of all for your awsome theme framework!
In my
single.php
controller I am doing this:Expected behaviour
When I request /books/ for a custom post type
books
I expect it to first look forsingle-books.tpl.php
, then forsingle.tpl.php
, then throw an error.Actual behaviour
It looks for
single-books.tpl.php
, but then it looks forsingle-.tpl.php
. The dash shouldn't be in there.See here: