Rolled back a few major versions to 1.09. And we see the same behavior. Other themes show the featured image. It may not be a specific version issue but something else related to the Gridzone theme. Any tip would be appreciated.
So, it turns out get_post_format and has_post_format for some reason are not working. I don’t know why it happened. I’m not familiar with the theme and wordpress code to track down the root cause but I have worked around the issue for now by bypassing those functions. So at least we got the featured images showing again.
Hi, at single.php , on the line 23 add this code:
<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail( ‘full’ );
}
?>
and images will appear again, same happen to me 🙂
Thanks @fselmani for solving the issue for me as well.
It works great.
The WP answer:
Use of undefined constant ‘full’ – assumed ”full” (this will throw an Error in a future version of PHP)
was fixed simply: “full” is right
-
This reply was modified 5 years, 4 months ago by
Milan.
Hi guys, is this still an issue? To make the featured image appear at the top of a post, you can select Post Format > Image.
@alxmedia hi, again the error is there. Now single.php is changed a lot. I have up to 4k posts and unfortunately I can’t edit all of them to make with ‘post format: image’ so hopefully there is a custom code to put like in the past which featured image will show as a default.