Reply To: Portfolio Page

Homepage Community Forums Optimal Theme Support Portfolio Page Reply To: Portfolio Page

#987
Wes
Moderator

    When you click on an image in the demo, the prettyPhoto slideshow is what comes up and displays all of the images. You can turn this off and have the images link to the post by doing the following –

    In your “page_portfolio.php” file in your theme, look for the area that looks like this (should be around line 50) –

    // Add Featured Image for the Portfolio posts in this Page Template
    add_action('genesis_before_post_content', 'legacy_portfolio_do_post_image');
    function legacy_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" rel="nofollow">%s</a>', genesis_get_image( array( 'format' => 'url', 'size' => 'Portfolio Full', 'attr' => array( 'class' => 'alignnone post-image' ) ) ), the_title_attribute('echo=0'), $img );
    }

    Then replace that code with the code below –

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