Portfolio lightbox doesn't work with Optimal v1.3

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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9097
    askdesign
    Customer

      I’m updating a client site with the html5-ready Optimal v1.3 theme. We’ve currently got Genesis v2 and Optimal v1.2.1 installed on the live site and everything is working fine.

      But, with Optimal v1.3, the prettyPhoto plug-in no longer works with the Portfolio template. The thumbnails look fine. When I click on a thumbnail, the hyperlink brings me a blank page, rather than the lightbox.

      I’ve tried it on a live site as well as my local server with MAMP. Is there a fix to this?

      I installed a plug-in (Responsive Lightbox) to get the same type of gallery layout, and actually prefer it to using the Portfolio template method. This plug-in has prettyPhoto as an option, and it works. So, I’m wondering why prettyPhoto didn’t work on its own.

      thank you!

      #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.

        #9111
        askdesign
        Customer

          Hi Wes, OK I see the code and switched the commenting to activate prettyPhoto. That did the trick.

          Another question: how do we enlarge thumbnails?
          I’m talking about the regular thumbnails for the theme, not the portfolio-thumbnails, which I’ve resized in functions.php.

          thank you

          #9118
          Wes
          Moderator

            Which thumbnails are you referring to? There are multiple thumbnails in different places.

            #9134
            askdesign
            Customer

              I’m referring to the 2 kinds of thumbnails:
              (1) theme thumbnails, where you can change the size on the Media Settings page. The default is 150x150px.
              (2) portfolio post thumbnails, which can be resized in functions.php.
              I’ve tried changing both of these thumbnail sizes to 300x214px, with and without cropping to achieve the desired results. The results are inconsistent. Some don’t resize. Some resize but the resolution is at the smaller 150x150px level. Some resize but stretch the image and distort it.

              The image’s original proportions should remain intact, so cropping ok. I’d like the 300x214px size. Do I have to regenerate the thumbnails somehow?
              Thank you…

              #9135
              Wes
              Moderator

                Are you referring to the thumbnails that show up in your blog page? If so, that can be adjusted from your Genesis Theme Settings page. You can add more sizes in your functions file (just like the portfolio size that is there now) and then they will show up in your Genesis Theme Settings under Content Archives.

                If you’re talking about the images that you add in a post, then that isn’t controlled by the theme, you would use WordPress’ image settings to control how they are displayed.

                Anytime you change your thumbnail size anywhere in the theme, make sure and use the Regenerate Thumbnails plugin to automatically adjust all of your thumbnails to the size you have selected.

                #9136
                askdesign
                Customer

                  Hi Wes,
                  OK, the Regenerate Thumbnails plug-in definitely helps! Thank you!
                  I am talking about both kinds of thumbnails you describe.

                  How would I add a new size in functions.php? I tried this:
                  add_image_size( 'attachment-thumbnail', 300, 214, TRUE );
                  But I don’t see any change in Genesis Theme Settings under Content Archives.

                  #9137
                  Wes
                  Moderator

                    Once you add it and save it to the functions file it’s supposed to show up in the dropdown selection under Content Archives…..you have to check the Featured Image box for it to show up. And this is only for the Featured Images on the Blog page.

                    #9138
                    askdesign
                    Customer

                      OK, I’ll check it out Wes. Greatly appreciate your time and help. Have a wonderful Thanksgiving!

                      #9142
                      Wes
                      Moderator

                        You’re Welcome!

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.