Staff Image

Support Area › Forums › Moonrise › Staff Image

Tagged: , ,

Viewing 8 posts - 1 through 8 (of 8 total)
URL to the page in question: kevincolbert.me
  • Author
    Posts
  • #17930
    KEVIN COLBERT
    Participant

    Hi Bill,

    I’m trying to get the staff image or in my case “My Portfolio” image to enlarge when clicked on, instead of taking of taking me to a different page.

    It does not have to look just like this but to give you an example of what I’m trying to do, if you look at this site http://www.cruzdeleon.com/ and go down to the “Fine Art” section click on one of the images it enlarges.

    Hope you can help me out with this,

    Kevin

    #17932
    Bill Robbins
    Participant

    Good Evening Kevin,

    It is possible to have those images open up in a lightbox instead of in a separate page. Here’s how:

    1. Go to the Appearance section in your WordPress control panel and select Edit.
    2. From the list of files on your right, choose staff-group-item.php
    3. Find this line:
      
      <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail( 'staff-thumbnail', array('class' => 'person') ); ?></a>
      

      and change it to this:

      
      <a href="<?php the_post_thumbnail( 'full' ); ?>" class="lightbox" rel="staff-group"><?php the_post_thumbnail( 'staff-thumbnail', array('class' => 'person') ); ?></a>
      
    4. Save your changes.

    I believe that should let those images open up full size in the theme’s lightobx. If you run into trouble, let me know.

    Have a great night,
    Bill

    #17936
    KEVIN COLBERT
    Participant

    That didn’t work. Now when you click on the photo it takes you to a 404 page. Have any other code we can try?

    Thanks,
    Kevin

    #17940
    Bill Robbins
    Participant

    Sorry about that Kevin,

    Let’s change the code to this instead of what’s above:


    Be sure to copy that from the support site and not the notification email.

    See if that won’t let the image open up in a lightbox for you.

    Let me know if it gives you any trouble,
    Bill

    #17942
    KEVIN COLBERT
    Participant

    Getting closer Bill. The lightbox is popping up but the browser (chrome, Firefox, & IE) are saying that “the request can not be found”.

    Thanks,
    Kevin

    #17944
    Bill Robbins
    Participant

    Shoot. I missed a bracket in that last bit of code. I updated the code above. Give this one more try and see how it works for you:

    Hopefully third time is the charm.

    #17947
    KEVIN COLBERT
    Participant

    Perfect! Third time was the charm. You’re awesome.

    Thanks for all your help,
    Kevin

    #17949
    Bill Robbins
    Participant

    Fantastic. Have a great weekend Kevin!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Staff Image’ is closed to new replies.