Featured Image How To

Community Forums Forums General Discussion Featured Image How To

This topic is: not resolved

This topic contains 14 replies, has 3 voices, and was last updated by  braddalton 5 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #100803

    leemarr
    Participant
    Post count: 31

    my featured images are not displaying on the single page …
    i don’t want to spend time inserting the images …

    how can i resolve this …

    using executive pro & minimum pro …

    thanx

    http://loop48.com/bump/
    #100932

    braddalton
    Participant
    Post count: 10217
    #102059

    leemarr
    Participant
    Post count: 31

    let me clarify …

    i want to see a full image displayed in the post (single post page) …
    will your solution do this …

    thanx

    #102060

    braddalton
    Participant
    Post count: 10217
    #102065

    leemarr
    Participant
    Post count: 31

    can you tell which line to start in functions to edit/replace …

    thanx

    #102076

    braddalton
    Participant
    Post count: 10217

    You don’t edit any existing code.

    You copy the code from here https://gist.githubusercontent.com/braddalton/384b81c569d20591797c/raw/4b640bac5b93b51ae98ee829f437fb4e6a773aee/functions.php

    And paste it at the end of your child themes functions.php file using a code editor like Notepad++.


    #102086

    leemarr
    Participant
    Post count: 31

    the image is not showing up …
    here’s what is displayed :

    view — http://loop48.com/bump/todays-hot-dog-boy-031414/

    view posts from the rest of category archive page — http://loop48.com/bump/category/dogworld/

    i placed the code last under the //* Register widget areas — see below:

    //* Register widget areas
    genesis_register_sidebar( array(
    ‘id’ => ‘home-slider’,
    ‘name’ => __( ‘Home – Slider’, ‘executive’ ),
    ‘description’ => __( ‘This is the slider section on the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home – Top’, ‘executive’ ),
    ‘description’ => __( ‘This is the top section of the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-cta’,
    ‘name’ => __( ‘Home – Call To Action’, ‘executive’ ),
    ‘description’ => __( ‘This is the call to action section on the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-middle’,
    ‘name’ => __( ‘Home – Middle’, ‘executive’ ),
    ‘description’ => __( ‘This is the middle section of the home page.’, ‘executive’ ),
    ) );

    /** Align featured image left of entry content below entry title */
    add_action( ‘genesis_entry_header’, ‘wpsites_post_image’, 14 );
    /**
    * @author Brad Dalton
    * @example http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
    * @copyright 2014 WP Sites
    */
    function wpsites_post_image() {

    if ( !is_singular(‘post’) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
    return;

    if ( $image = genesis_get_image( array( ‘format’ => ‘url’, ‘size’ => genesis_get_option( ‘image_size’ ) ) ) ) {
    printf( ‘%s‘, get_permalink(), $image, the_title_attribute( ‘echo=0′ ) );
    }

    }

    #102091

    Summer
    Participant
    Post count: 1105

    @leemarr, try inserting the image into the post body without setting it as the Featured Image (that really is the only way to get it to display as part of the single post).

    If you insert your featured image in the post body but leave the “Featured Image” box empty, Genesis will use that first post image as the featured image.

    This is a unique Genesis feature that works by default unless you override it with a declared Featured Image, or by turning it off in functions.


    #102177

    leemarr
    Participant
    Post count: 31

    that does does the trick but i was trying to avoid doing this because all my posts use the featured image to display the full image in a post …

    my previous theme used this method …

    when i switched to genesis exec pro and the minimum pro theme i ran into this problem …

    #102242

    Summer
    Participant
    Post count: 1105

    Hm, maybe I’m misunderstanding what you’re trying to achieve?

    If you insert an image of any size into the body of your post, Genesis will automatically display a resized crop of that image as the featured image in archive/category listings… isn’t that what you said you wanted to do in your original post?

    For example if you insert a post image that’s 350px wide by 600px high, and your featured image is only 150×150, Genesis will display the 150×150 crop of that image as the featured image when you look at the archives (and I know this happens, from years of experience)

    Or did I misunderstand and you wanted to do something different with which image is which?


    #102308

    leemarr
    Participant
    Post count: 31

    no i don’t want to insert an image …

    i want to click the feature image link (in meta box) and either upload an image to display a full image in the post or choose a library item to display a full image …

    my old theme does exactly this and there is no need to choose the add an image link …

    #102323

    braddalton
    Participant
    Post count: 10217

    Please post code correctly otherwise anyone that copies the code now will get errors http://www.studiopress.com/forums/faq/#code


    #102373

    Summer
    Participant
    Post count: 1105

    @leemarr, your best bet might be to copy the code from your old theme that does this and include in the functions.

    It sounds like whomever did your old theme might have included some custom code to display the featured image in the body of the single post, in which case that may have been a modification of the single post template, but I couldn’t be certain without seeing the behavior you’re talking about that you want to achieve now.


    #102973

    leemarr
    Participant
    Post count: 31

    as requested here’s the code:

    //* Register widget areas

    [php]genesis_register_sidebar( array(
    ‘id’ => ‘home-slider’,
    ‘name’ => __( ‘Home – Slider’, ‘executive’ ),
    ‘description’ => __( ‘This is the slider section on the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-top’,
    ‘name’ => __( ‘Home – Top’, ‘executive’ ),
    ‘description’ => __( ‘This is the top section of the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-cta’,
    ‘name’ => __( ‘Home – Call To Action’, ‘executive’ ),
    ‘description’ => __( ‘This is the call to action section on the home page.’, ‘executive’ ),
    ) );
    genesis_register_sidebar( array(
    ‘id’ => ‘home-middle’,
    ‘name’ => __( ‘Home – Middle’, ‘executive’ ),
    ‘description’ => __( ‘This is the middle section of the home page.’, ‘executive’ ),
    ) );[/php]

    /** Align featured image left of entry content below entry title */
    add_action( ‘genesis_entry_header’, ‘wpsites_post_image’, 14 );
    /**
    * @author Brad Dalton
    * @example http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
    * @copyright 2014 WP Sites
    */

    [php]function wpsites_post_image() {

    if ( !is_singular(‘post’) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
    return;

    if ( $image = genesis_get_image( array( ‘format’ => ‘url’, ‘size’ => genesis_get_option( ‘image_size’ ) ) ) ) {
    printf( ‘%s‘, get_permalink(), $image, the_title_attribute( ‘echo=0′ ) );
    }

    }[/php]

    • This reply was modified 5 months, 3 weeks ago by  leemarr.
    • This reply was modified 5 months, 3 weeks ago by  leemarr.
    • This reply was modified 5 months, 3 weeks ago by  leemarr.
    • This reply was modified 5 months, 3 weeks ago by  leemarr.
    #102986

    braddalton
    Participant
    Post count: 10217

    The code will break your site if you copy and paste it because its been copied from the web page.

    Please paste the code from a file into Github Gists.


Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.