Hi everyone,
I would like to hide the featured image on specific posts. My idea is to create a custom field (hide_featured_image") and set its value to "yes". Then use some php code like the following:
-----
$shouldHideFeaturedImage = get_post_meta($post->ID, 'hide_featured_image', true);
if ( $shouldHideFeaturedImage != 'yes' ) {
if ( has_post_thumbnail() ) {
the_post_thumbnail('medium');
}
}
-----
Am I on the right track here? And where would I put this code? People told me I should look for the single.php file but I can't find it.
Thanks!
Emanuel