Repeating Image

Homepage Community Forums Aspire Theme Support Repeating Image

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20881
    erinok
    Customer

      Hello,

      I am using Apsire Pro and wanted my blog to look like it does in the demo, with a nice large image at the top above the excerpt.

      I found the settings in Customize > Content Archives

      I selected: Display entry exceprts

      I checked Display the featured image

      I set featured image size to 1200 x 600

      It works perfectly on my blog, but the problem is that on my PAGES, any image that is used in the body content of the page is now duplicated at the TOP of the page, ABOVE the title.

      Do you know how I can remove this duplication?

      Thank you very much for your help, Erin

      #20895
      Wes
      Moderator

        The code that makes that happen will be adjusted in the next update. Until then you can swap out the featured image code in your functions.php file for this version instead –

        add_action( 'genesis_before_entry', 'aspire_featured_photo' );
        function aspire_featured_photo() {
        
            if ( ! ( is_singular() && has_post_thumbnail() ) ) {
                return;
            }
        
            $image = genesis_get_image( 'format=url&size=single-posts' );
        
            $thumb_id = get_post_thumbnail_id( get_the_ID() );
            $alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
        
            if ( '' == $alt ) {
                $alt = the_title_attribute( 'echo=0' );
            }
        
            printf( '<div class="featured-image"><img src="%s" alt="%s" class="entry-image"/></div>', esc_url( $image ), $alt );
        }

        Let me know if you have trouble locating the Featured Image code in your functions file.

        #20906
        erinok
        Customer

          Awesome! That worked perfectly, thank you so much! Just curious, when will the next theme update be available and will I be notified via WordPress updates? Thanks again for your help Wes!

          #20943
          Wes
          Moderator

            I hope to get back to it soon, within a week or sooner.

            By default, Genesis Child themes don’t really have a way to send update notifications like the way the Genesis Framework does. They have to be manually updated by the user themselves so their work/customizations aren’t overwritten or lost by an update.

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