• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Appfinite

Appfinite

Premium WordPress Themes for The Genesis Framework

  • Themes
  • Blog
  • Tutorials and Resources
  • Forums
  • Contact Us

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

Home › 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

November 23, 2013 at 11:27 am #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.

Primary Sidebar

Search Forums

Affiliate Program

Looking to earn some money? Join our Affiliate program and earn 35% of every sale you refer. Top referrers earn 40-50%.

Join Now →

The Genesis Framework

All of our themes are designed for the Genesis Framework. You will need to purchase Genesis in order to use any of our themes.

Purchase Genesis

Hire a Web Developer

Need help setting up or customizing your website?

Contact Us →

Search Full Site

  • Buy Genesis!
  • Shopping Cart
  • Themes
  • My Account
  • Support Forums
  • Tutorials and Resources
  • Privacy Policy
  • Contact Us
  • Follow Us on Twitter

Copyright © 2023 · Appfinite · Built With The Genesis Framework