Hey not sure I understand, can you elaborate? Are you wanting to place text etc in the actual lightbox that pops up?
Thread Starter
bevels
(@bevels)
Thanks for the reply..
I’ll try and explain this a little clearer.
Easy Image Gallery obviously includes fancybox, I’d like to leverage of its implementation via other links that are not ‘easy image gallery’ related.
I’m hoping I can place an image on a page and include additional fancybox code, so when it’s clicked it opens in fancybox.
Something like…
<a class="imageoutsidegallery" title="" href="http://mysite/wp-content/uploads/2014/02/image.jpg" rel="fancybox">
So by including rel=fancybox (or whatever the code needs to be) in a normal link, it opens my image (which is not in an ‘Easy Image Gallery’) in fancybox.
I can’t really make myself any clearer, I hope that makes sense.
B
Right, gotcha.
Paste this into your functions.php (mind the opening PHP tag) and change the CSS class if you want
https://gist.github.com/sumobi/0c738a1fea80f2659478
Then going by your example, this is all you need:
<a class="custom-class" title="" href="http://mysite/wp-content/uploads/2014/02/image.jpg"><img src="..." />
</a>
Don’t need rel unless the images are part of a gallery
Thread Starter
bevels
(@bevels)
Hey Sumobi..
Firstly, massive thanks for helping out I really appreciate it!
It works.. however the fancybox overlay doesn’t work (darkening down of the entire viewport behind the opened image)
And
None of the Easy Image Galleries work if that script is in functions.php
It’s so close!
Thanks man
B
Thread Starter
bevels
(@bevels)
Hey bud.. I’ve got this working exactly as it should on another site I’m building. There must be something interfering with the process on the first site I tried to implement it on. I’ll have a play with it and if I can figure out why it’s not working properly I’ll post the reason up here for others in case they try this and run into a similar issue.
Again.. thanks a million for this!
B
Sounds like a Javascript error, are you familiar with how to use a browser’s development tools? Happy to take a look if you can show me a live URL of where it doesn’t work.
Closing due to inactivity