anonymized-13749270
(@anonymized-13749270)
Please explain more about this, as I think you are trying to hide featured image for certain posts and that can be done through un-setting this image while editing those posts.
Thank you.
Not quite hide altogether, just on the full Post page. It would still show as a thumbnail image on the blog and through other post preview applications.
anonymized-13749270
(@anonymized-13749270)
So, no featured image on single posts view?
Ok – Are you good with Child themes? create one, quick and simple, activate it, and add a new file in the child theme, name it content.php.
Edit content.php file, paste this code in it:
http://themes.svn.wordpress.org/twentytwelve/1.7/content.php
Go to the 20th line,
Edit this:
<?php if ( ! post_password_required() && ! is_attachment() ) :
Make it:
<?php if ( ! post_password_required() && ! is_attachment() && !is_single() ) :
Save, and let me know how it goes.
Hi,
In the content.php file there is no line of code you specified (in fact, nothing with the word “password”).
Sorry,
anonymized-13749270
(@anonymized-13749270)
I assume your theme is outdated, maybe.
Well then, go to content.php, and search for ‘thumbnail’, and paste here the part of the code which contains it.
Thanks!
<?php the_post_thumbnail(); ?>
anonymized-13749270
(@anonymized-13749270)
Okay make it:
<?php if(!is_single()) { the_post_thumbnail(); } ?>
And let me know how it goes.
That works to hide the featured image, but on all Posts. I wish to hide it on only selected posts.
I have this ability on another Theme. You can see the option here: http://karnaliexcursions.com/?attachment_id=739.
anonymized-13749270
(@anonymized-13749270)
Sorry, you should have said that from the beginning. no worries.
<?php if(!is_single( array(1,2,3) )) { the_post_thumbnail(); } ?>
Change 1,2,3 with the post IDs ( those posts you don’t want the featured image to appear in the single view, it will appear in index pages like homepage )