Hi,
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.hbs template 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 {{if}} code.
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?
Brilliant! I thought of tags but missed the memo on internal tags. Thanks for bringing my attention to this @egg, I was poring over the docs but missed it!
Hijacking this thread. How can I disable the feature image from the post page completely but it will still show as a feature/preview image otherwise at homepage?