Featured Image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20751
    Andykev
    Customer

      Wes, the “featured image” for the Legacy theme (the new one)… It is doing something the “old one” (and Epik, other Genesis themes do not): It displays the chosen featured image at the top of the page. I use “featured image” to have an image for the Genesis Featured Page widget…and in the other themes selecting an image does NOT insert it in the page.

      Do I change it in functions.php, or simply add this to the entry section of the css? Or is there a better solution on this?

      .entry-image {
             display: none}
      #20752
      Wes
      Moderator

        Yea you can remove that if you want. I was thinking about moving it back under the Title area.

        The code is coming from the functions.php file. Should look like this –

        // Add featured image above the entry content
        add_action( 'genesis_before_entry', 'legacy_featured_photo' );
        function legacy_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 );
        }

        You can either remove or comment it out….or have it show up in a different spot.

        Let me know your thoughts on moving it under the title area.

        #20753
        Andykev
        Customer

          There it is! Ok. I am going to remove it. My personal choice is to add images directly to a page, and utilize the “Featured Image” for posts/pages for the Portfolio or Featured Page Widget. Don’t want it “front and center” on a page.

          #20754
          Andykev
          Customer
            This reply has been marked as private.
            #20800
            Wes
            Moderator

              Looks good! Definitely let me know once it’s finished and I can share a link on Social Media.

              #23027
              kriistjanm
              Customer

                Hey Wes, I was having the same problem with the new Legacy theme and found the solution in this thread.

                May I ask what I should change if I wanted to display the image under the title/byline instead of above?

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