• Resolved mcnaden

    (@mcnaden)


    Hi,

    I have very little coding experience. I am modifying a page template to use the secondary image instead of the featured image. Here is the section where the image is called. What do I replace to get the secondary image displayed?

    Thanks to anyone that can help!
    Mark

    // Add Featured Image for the Portfolio posts in this Page Template
    add_action('genesis_before_post_content', 'adapt_portfolio_do_post_image');
    function adapt_portfolio_do_post_image() {
        $img = genesis_get_image( array( 'format' => 'html', 'size' => 'portfolio-thumbnail', 'attr' => array( 'class' => 'alignnone post-image' ) ) );
    	printf( '<a href="%s" rel="prettyPhoto[gallery1]" title="%s">%s</a>', genesis_get_image( array( 'format' => 'url', 'size' => 'Portfolio Full', 'attr' => array( 'class' => 'alignnone post-image' ) ) ), the_title_attribute('echo=0'), $img );
    }

    https://wordpress.org/plugins/multiple-post-thumbnails/

  • The topic ‘Modify Page Template for Secondary Image’ is closed to new replies.