How to use PrettyPhoto plugin?

Homepage Community Forums Epik Theme Support How to use PrettyPhoto plugin?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4622
    SusanR
    Customer

      Hi, Wes:

      I’ve created a number of posts, with featured images, and have created a Portfolio Page. The images are displayed in the Portfolio Page in the same manner as the demo.

      I would like to have the Portfolio images display in a light box, so I installed the PrettyPhoto plugin, which I believe is the one you recommended. How do I activate the plugin so that when I click on an image in the Portfolio, it opens up a lightbox, instead of linking to the post?

      #4623
      Wes
      Moderator

        Actually you don’t need to install any plugins to get it working, it’s already inside of the theme (so you can deactivate or uninstall the one you just added). To get prettyPhoto working, all you have to do is take a look in your page_portfolio.php file and uncomment this –

        /**
         * 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 );
        }
        */

        You’ll also notice a block of code right above that which does the same thing, except without the prettyPhoto. You can comment that code out so it won’t show two of the same images.

        I’m sure you already know how to uncomment php code….if not, just let me know.

        #4624
        SusanR
        Customer

          Worked perfectly. Thanks, Wes!

          #4625
          Wes
          Moderator

            You’re Welcome!

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘How to use PrettyPhoto plugin?’ is closed to new replies.