Tagged: Lightbox
-
AuthorPosts
-
January 23, 2017 at 4:13 pm #737301
Hello there,
I have included the image directly into template file:
But the lightbox effect does not work. How do I activate the lightbox for it? Do i have to enque some .js files?
Thank you
January 23, 2017 at 4:17 pm #737305Hey MCepkus!
Please refer to this post – https://kriesi.at/support/topic/help-with-iframe/#post-604232
Best regards,
YigitJanuary 23, 2017 at 5:28 pm #737358Hello,
Thank you, but I am not sure what do you mean by that post. The image is an actual html markup with target attribute and lightbox class added. It still opens up in a new tab not a lightbox. If I add the image on Layout Editor the image lightbox works, however, I copy-paste the same html of the image the lightbox does not work
January 23, 2017 at 5:33 pm #737359This is the html code:
<div class="avia-image-container av-styling- avia-builder-el-6 avia-builder-el-no-sibling avia-align-center " itemscope="itemscope" itemtype="https://schema.org/ImageObject"><div class="avia-image-container-inner"><a href="*img_URL*" target="_blank" class="lightbox mfp-iframe avia_image lightbox-added"><img class="avia_image " src="*img_URL*" alt="" title="get" itemprop="contentURL"><span class="image-overlay overlay-type-image" style="left: -5px; top: 0px; overflow: hidden; display: block; height: 227px; width: 364px;"><span class="image-overlay-inside"></span></span></a></div></div>
- This reply was modified 7 years, 11 months ago by MCepkus.
January 24, 2017 at 2:18 pm #737745Hi,
Can you please elaborate on the changes you would like to make?
We might be able to provide you an easier solution.Best regards,
YigitJanuary 24, 2017 at 3:12 pm #737778Hello,
Basically I want to add an image in php template which would open in a lightbox, not in a new tab.
Kind regards.
MindaugasJanuary 24, 2017 at 3:27 pm #737784Labas Mindaugai!
Where exactly are you adding the code?
I tried following and it did work fine on my local installation when the code is placed under section with id=’main’ in header.php file
<?php echo do_shortcode("[av_image src='http://localhost:8888/enfold/wp-content/uploads/2012/04/2.jpg' attachment='316' attachment_size='full' align='center' styling='circle' hover='' link='lightbox' target='' caption='' font_size='' appearance='' overlay_opacity='0.4' overlay_color='#000000' overlay_text_color='#ffffff' animation='no-animation' custom_class='custom-class'][/av_image]"); ?>
Cheers!
YigitJanuary 24, 2017 at 3:53 pm #737797Labas!
I was including a raw html, instead of a shortcode. The shortcode works fine, however, I load the image from a ftp folder, instead of wp media library, and I do not have an attachment ID, which is needed for a shortcode to work
Kind regards,
MindaugasJanuary 26, 2017 at 1:40 pm #738900Any update on this?
January 27, 2017 at 3:02 pm #739398Still waiting for an answer…
January 30, 2017 at 10:34 am #740104Hi,
I load the image from a ftp folder, instead of wp media library,
The attachment id parameter is required. Why don’t you upload it in the media library?
Best regards,
IsmaelJanuary 30, 2017 at 1:05 pm #740161Hello,
But what is the difference? Can’t you tell me just what part of lightbox am I missing which comes with a shortcode? I load the image from FTP because I have couple hundreds of images which has to be loaded depending on the object, and adding them through media library is kinda time consuming.January 31, 2017 at 6:26 am #740491Hi!
Alright. If you want to use the html markup directly, please try this:
<?php echo '<div class="avia-image-container avia-align-center "><div class="avia-image-container-inner"><a class="lightbox avia_image" href="URL HERE" target="_blank"><img class="avia_image " title="get" src="URL HERE" alt="" /></a></div> </div>'; ?>
Adjust the href and the src attribute value.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.