Single Post Page – Title Before Image

Homepage Community Forums Elevate Theme Support Single Post Page – Title Before Image

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #22864
    Bud
    Customer

      Hi

      Still love Elevate. Decided to re-do and expand site still using Elevate rather than swtich to another theme.

      In functions file you have:

      //* 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”>%s</div>’, $image, the_title_attribute( ‘echo=0’ ) );
      }

      }

      Seems like it’s the second If statement that needs to change?

      Please help! I’ve tried a lot of things but can’t get it to work.

      Thanks.

      Bud

      #22867
      Wes
      Moderator

        To move the title up top you can change the “Priority” from 5 to 10 (or more if needed).

        Look at this line of that code above –

        add_action( ‘genesis_entry_header’, ‘elevate_featured_photo’, 5 );

        …and change it to this –

        add_action( ‘genesis_entry_header’, ‘elevate_featured_photo’, 10 );

        Here’s what it should look like after you make that change – https://i.postimg.cc/G2yS8FJH/Screen-Shot-2018-11-02-at-12-00-52-AM.png

        Let me know if that works

        #22868
        Bud
        Customer

          Thank you so much. This sure did work.

          I had not thought about changing the priority. I’ve got a lot more to learn but I will.

          Bud

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘Single Post Page – Title Before Image’ is closed to new replies.