-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fallback Featured Image #32447
Comments
Hi @maharzan Chandra I will call this an associated issue: |
I wonder why such simple things has become so complex nowadays.. |
We should think out a simpler solution and present it..:) |
For now, you could just use the |
I think this should be the default setting as outlined in the issue I created about this here: #31849 |
Thanks @justintadlock. That seems to do the trick. |
Thanks for reporting @maharzan and @justintadlock for pointing out the proper filter: #32447 (comment). I'll close this now as related discussions here are tracked in separate issues. |
Hey Nik @ntsekouras I believe we might need to open this issue again, as the associated issue: I believe there still are aspects needed to be looked closer at in both issues. |
I went ahead and reopened this issue. |
While triaging, I found this also to be reported at #34865 with a bit of discussion there as well so I am closing this issue. Please follow that issue for further updates and to share any opinions that you have. |
I have been trying to learn making block base themes and encountered a simple issue. I need to show a default fallback image if the posts have no featured images.
Obviously, with older/current method, we can do it something like this
But with blocks and new html templates, I can only do
Further digging down the files, I saw this file and line was extracting the featured image and I didn't see any hooks in there so I can try to replace it in functions.php
https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/post-featured-image/index.php#L24
Is this possible in any other way? If not, I guess it would be really nice to have a hook in there so we can apply a default featured image on new block based themes.
The text was updated successfully, but these errors were encountered: