Reply To: Portfolio lightbox doesn't work with Optimal v1.3

Homepage Community Forums Optimal Theme Support Portfolio lightbox doesn't work with Optimal v1.3 Reply To: Portfolio lightbox doesn't work with Optimal v1.3

#9101
Wes
Moderator

    Yes prettyPhoto is deactivated by default. You can easily activate it by “uncommenting” the code, and then “commenting out” the code right above it.

    Here is the code you’ll need to “uncomment” –

    /**
     * Opens Featured Images with prettyPhoto Slideshow
     *
     * @author Wes Straham
     * @since 1.0.0
     */
    /*add_action( 'genesis_before_post_content', 'epik_prettyPhoto_image' );
    function epik_prettyPhoto_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 );
    }
    */

    The code right above that looks like this –

    /**
     * Adds Featured Image and links it to the Post
     *
     * @author Wes Straham
     * @since 1.0.0
     */
    add_action( 'genesis_entry_header', 'optimal_portfolio_do_post_image' ); 
    function optimal_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">%s</a>', get_permalink(), the_title_attribute('echo=0'), $img ); 
    }

    Be careful if you’re not familiar with editing PHP code and you’re working from the WP editor (and not an HTML/CSS/PHP editor through FTP)…..if you need my assistance just let me know. You may already know how to code, but I just wanted to make sure to be on the safe side.