Home › Forums › Winning Agent Pro Theme › Remove Featured Image from Community Page
- This topic has 4 replies, 4 voices, and was last updated 6 years, 10 months ago by
WiWebs.
- AuthorPosts
- January 14, 2015 at 8:37 am #4272
Waterbaby
ParticipantIs there a way to remove the featured image from the top of an individual community page? I want to be able to insert my own image within the page but still set the featured image for for use with the communities widget & archive page.
Thanks!
- June 1, 2015 at 8:09 am #4533
rnewkirk
ParticipantWaterbaby – were you able to figure this out? I’m wanting to do the same, but on a standard page(s).
- June 1, 2015 at 8:09 am #4534
rnewkirk
Participant@Waterbaby – were you able to figure this out? I’m wanting to do the same, but on a standard page(s).
- June 2, 2015 at 2:52 pm #4535
Ginger Coolidge
ParticipantHi there,
I answered Waterbaby’s question on this thread:
Look for my response from Jan 22nd of this year for the details.
- August 8, 2015 at 10:42 am #4585
WiWebs
ParticipantGreetings:
I just wanted to add the entire solution here to help others from having to go chasing through multiple threads to find the solution.
I wanted to remove only the “top” featured image thumbnail from the actual singular community page that is displayed after clicking on the community thumbnail on the home page.
This is how I did it:First I found the following in the functions.php
// Add featured image above single posts.
Then I looked for the “if” statements:
if ( ! is_singular() || ! has_post_thumbnail() ) {
Then I had to add the “wap community” and specific pages that I don’t want the thumbnail to show up on (all singular community pages):
if ( ! is_singular() || ! has_post_thumbnail() || is_singular( 'wap-community' ) || is_page(24) || is_page(62) || is_page(205) || is_page(211) || is_page(266) || is_page(280) ) {
This is the end result:
// Add featured image above single posts. add_action( 'genesis_before_entry_content', 'wap_featured_image' ); function wap_featured_image() { // Return early if not a singular or does not have thumbnail if ( ! is_singular() || ! has_post_thumbnail() || is_singular( 'wap-community' ) || is_page(24) || is_page(62) || is_page(205) || is_page(211) || is_page(266) || is_page(280) ) { return; } echo '<div class="featured-image">'; echo get_the_post_thumbnail( $thumbnail->ID, 'feature-wide' ); echo '</div>'; }
You can see the resulting look here:
http://www.century21delafield.comHope this helps make this process easier for others 🙂
Have a great day!
- AuthorPosts
- You must be logged in to reply to this topic.