Unwanted Featured Image above entry-title

Homepage Community Forums Elevate Theme Support Unwanted Featured Image above entry-title

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23075
    Jacob
    Customer

      On certain pages of my site a featured image is being displayed above the H1 entry-title even though I don’t want any featured images on my pages and there is no featured image selected for those pages. Messing with it, I’ve tried adding a featured image and it replaces this existing one, displaying it in the same spot. When i remove the featured image, another image is displayed from my media library automatically. I’m not sure if this is an Elevate theme, Genesis, or a WordPress problem.

      I see in the theme functions php:

      //* Add featured image above the entry content
      add_action( 'genesis_entry_header', 'elevate_featured_photo', 5 );
      function elevate_featured_photo() {
      
      	if ( is_attachment() || ! genesis_get_option( 'content_archive_thumbnail' ) )
      		return;
      
      	if ( is_singular() && $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
      		printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', $image, the_title_attribute( 'echo=0' ) );
      	}
      
      }
      

      Though I’m not exactly sure was these mean, I can tell that most likely some of my pages are meeting the requirements of one of these if statements, triggering an image to be displayed, I’m just not sure how that is happening and how I can stop it from happening.

      Any help would be appreciated!

      #23076
      Jacob
      Customer

        Figured it out, I didn’t realize I still had some old images “attached” to those pages and Elevate was inserting those in that spot as it’s made to. So by changing my media library view from grid to list, the “detach” option appears.

        #23078
        Wes
        Moderator

          Glad you got it figured out. BTW, that particular code in the functions file is supposed to add the featured image above the title on “Single” pages. If you want, you can remove or comment that block of code out if you’d prefer not to have it show up on those pages.

          It’s not a requirement for it to be there, I just added it in as an extra feature.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.