Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

[SOLVED] Hiding the featured image from specific posts


  #1  
Old Jun 9, 2013, 04:11 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
[SOLVED] Hiding the featured image from specific posts

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
__________________
Emanuel
http://www.sferios.com
  #2  
Old Jun 9, 2013, 06:13 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
How about just using CSS targeted to those specific pages and featured images?
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Jun 9, 2013, 07:15 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
The problem with that is that it is a daily news site, and there are many content contributors. I need them all to be able to choose whether the featured image displays inside the post or not.
__________________
Emanuel
http://www.sferios.com
  #4  
Old Jun 9, 2013, 07:35 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You will need to make some changes in bfa_post_parts.php arond line 149 (v 3.7.12)
  #5  
Old Jun 9, 2013, 07:51 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Actually Juggledad, that affects the display of the thumbnail on multi-post pages. What I am wanting to do is remove the featured image from select "single-post" pages.
__________________
Emanuel
http://www.sferios.com
  #6  
Old Jun 9, 2013, 08:03 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
OMG never mind! I'm the one who added a widget area to the single post pages then used a php-enabled text widget in order to display the featured image there to begin with!!!

It was just so long ago I forgot.

I thought the featured image was showing up on single post pages automatically.

Problem solved. Thanks!
__________________
Emanuel
http://www.sferios.com
  #7  
Old Jun 9, 2013, 08:19 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Featured images are for multi post pages. And if you don't want the featured image why not remove it from the post edit page?

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove image from specific posts on home page feed. bangert Montezuma Theme 6 Oct 10, 2012 12:26 AM
[SOLVED] post-specific header image w/ css insert (page-specific ones work, but not o viewdesigninc Header configuration & styling 10 Oct 1, 2012 03:43 PM
[SOLVED] Featured Image Now Not Working On Any New Posts After Upgrade anpbaystate New Versions, & Updating 2 Jan 20, 2012 06:22 PM
Desperately looking for help with HIDING header image on one specific page Cristiacus Header configuration & styling 0 Jun 2, 2009 03:50 PM


All times are GMT -6. The time now is 11:06 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.