Understanding how featured image works

Community Forums Forums Design Tips and Tricks Understanding how featured image works

This topic is: not resolved

This topic contains 3 replies, has 4 voices, and was last updated by  charriott4 5 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15086

    OctaneMatt
    Participant
    Post count: 5

    I was using the featured image feature of WordPress with my old theme and now I’m trying to understand how to migrate everything to the Genesis Magazine theme. It seems the philosophy of Genesis is different in that the featured image is not shown when viewing the post. This made my old posts look very bare.
    So I then found this snippet which put the featured image in teh post:
    <code>
    /** Add Featured Image to Posts – the Webonanza style */
    add_action( ‘genesis_after_post_title’, ‘child_do_single_post_image’ );
    function child_do_single_post_image() {
    if( is_single() )
    genesis_image( array( ‘size’ => ‘single-post’, ‘attr’ => array( ‘class’ => ‘center’ ) ) );
    }
    </code>
    The problem I found is that the featured images were not served from the CDN nor processed by Photon so there were some very large images being scaled in HTML.
    How should I proceed? I would like the front page (and categories) to look like a typical blog with text and photos, and when viewing a single post that it doesn’t appear to be missing photos.
    My site: blog.octanenation.com
    A general blog style I’m trying to achieve: Autoblog.com or Hooniverse.com

    Thanks for your help!

    #16095

    SoZo
    Moderator
    Post count: 1573

    If you’re CDN isn’t serving the images you should contact them. But your code should be pulling in the the “single-post” image size. Did you run the regenerate thumbnails plugin after adding your new image size?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #16514

    CenterPixel
    Participant
    Post count: 1

    I am trying to do the same thing with the Midnight child theme.  The above code had no effect.  Any ideas how I would do this?

    #99075

    charriott4
    Participant
    Post count: 60

    Has anyone figured this out yet? I would like to know how to do this as well.


    Web Designs By Chrissy | Twitter @designbychrissy

    Follow Me On Facebook

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

You must be logged in to reply to this topic.