I use feature images for my post index, but don’t want to always use the feature image as my hero image on top of the post.
I know I can
- Use custom post templates for slugs
- Modify the
post.hbstemplate to remove the feature image (and always put in my own hero image)
But I’d like to make it an option. e.g. Change the
Right now the code in
post.hbs says “If there’s a feature image, stick it on top of the post!”
Any suggestions for how to make this
hbs code say “if there’s a feature image and no hero image, which I checked by looking for various classes or HTML elements, then put it on top! Otherwise do nothing.”
That way I’d do something like put " in the header, just for times I want to do this.
AFAIK I can’t use handlebars to check for the presence of DOM elements, right?