• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Streamline Featured Image php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Streamline Featured Image php

This topic is: not resolved

Tagged: php, streamline theme

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 9 months ago by booksatruestory.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 13, 2013 at 10:07 pm #26122
    booksatruestory
    Member

    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.

    March 14, 2013 at 8:28 am #26171
    booksatruestory
    Member

    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' ) );
    }

    }

    March 18, 2013 at 10:46 am #29031
    jthrashr
    Member

    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.

    March 18, 2013 at 10:58 am #29036
    jthrashr
    Member

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

    March 18, 2013 at 11:37 am #29052
    booksatruestory
    Member

    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.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble