Streamline Featured Image php

Community Forums Forums Design Tips and Tricks Streamline Featured Image php

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  booksatruestory 1 year, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #26122

    booksatruestory
    Participant
    Post count: 7

    I really like the php code in the Streamline theme that adds the featured image above the post title.  However, I only want this feature to work with some of my posts and not all of them.  Is there a way to make it so I can pick which posts have this feature and turn it off on the rest?

    blog URL if you need it:

    http://practice.booksatruestory.com/

    I designed the featured image for the first post and it looks nice, but the images above the posts on the rest of them do not look good.  Thanks in advance for any help.

    #26171

    booksatruestory
    Participant
    Post count: 7

    Sorry, I forgot to add the php code:

     

    /** Add post image above post title */
    add_action( ‘genesis_before_post’, ‘streamline_post_image’ );
    function streamline_post_image() {

    if ( is_page() ) return;

    if ( $image = genesis_get_image( ‘format=url&size= 255px by 80px’ ) ) {
    printf( ‘<a href=”%s” rel=”bookmark”><img align=”center” class=”banner” src=”%s” alt=”%s” /></a>’, get_permalink(), $image, the_title_attribute( ‘echo=0′ ) );
    }

    }

    #29031

    jthrashr
    Participant
    Post count: 4

    I’m an interested in a fix for this as well. If I have an image in the post, and I don’t set a featured image, then I don’t want the them to grab a random image in the post.

    #29036

    jthrashr
    Participant
    Post count: 4

    For a temporary fix, I’m adding a 1x1px transparent png as the featured image.

    #29052

    booksatruestory
    Participant
    Post count: 7

    That’s a good idea for a temporary fix if the look is really bothering me.  But I have 470 posts and I don’t want to go and do that for every single one…..

    It would be nice to turn the php into a short code or something so I could pick which posts have it by having the short code.

    Or a way to have the images cropped to be the exact size of the above post image (643px x 250 px)

    or not have it show up above the post if there is no featured image.

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

You must be logged in to reply to this topic.