• I’m using a real estate listing plugin. It’s great except for one thing… the gallery portion. It’s in a link format so when you click on a photo it takes you to the image’s url.
    I just want to see if I can throw a snipet of php into the plugin’s functions.php that’ll create a thumbnail to full-size effect instead of redirecting the entire page.

    The client will be taking over after we finish the site and he wants to have to go through as few hoops as possible to put photos on the site, which is why I’m not using a separate gallery plugin (I can’t find a free one that connects to the Post toolbar that has everything he wants)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Aside from plugins do not necessarily have functions.php, it’s never a good idea to alter any plugin’s code. You will likely lose your changes when the plugin is updated, and failure to update leaves you vulnerable to security holes. If the plugin author did not see his way to provide useful hooks for you to use your only real option is to use javascript or jQuery to override the plugin’s output after it goes out to the browser.

    Assuming the image resources are predictably named, you could replace each link with a thumbnail that does a lightbox like effect when clicked.

    There are lots of lightbox plugins that will do this automatically for you. This one seems to be a good one, given the reputed authors. You can search for ‘lightbox’ in the plugins section to find more of these.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Function for a photo to enlarge when clicked’ is closed to new replies.