minimum theme featured image problem

Community Forums Forums Design Tips and Tricks minimum theme featured image problem

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  cdils 1 year, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7450

    tribalcafe
    Participant
    Post count: 8

    I am trying to customize the Minimum theme and as part of this I want to place the featured image on blog page above the post title. Using this code I achieved that but the portfolio ‘page’ now has two images and I can’t figure out how to get rid of it.

    add_action( 'genesis_before_post_content', 'generate_post_image', 5 );
    function generate_post_image() {
    
    	if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    		return;
    
    	if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
    		printf( '<a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    	}
    
    }
    
    website: www.garyfox.co.uk
    
    Any help or ideas appreciated

     

    #15295

    cdils
    Participant
    Post count: 421

    Hi there,

    Not sure if you’re still having trouble or not. Have you seen the new Genesis Minimum Image Extender plugin?

    http://wordpress.org/extend/plugins/genesis-minimum-images-extended/

    This might be a non-coding solution for you. :)

    Otherwise, you could add in a conditional to your code to make sure you’re not on a single portfolio page:
    if ( !is_singular( 'portfolio' ) ) {
    // print the image
    }

    Cheers,
    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.

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

You must be logged in to reply to this topic.