Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #737301

    Hello there,

    I have included the image directly into template file:

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

    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

    #737305

    Hey MCepkus!

    Please refer to this post – https://kriesi.at/support/topic/help-with-iframe/#post-604232

    Best regards,
    Yigit

    #737358

    Hello,

    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

    #737359

    This 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, 10 months ago by MCepkus.
    #737745

    Hi,

    Can you please elaborate on the changes you would like to make?
    We might be able to provide you an easier solution.

    Best regards,
    Yigit

    #737778

    Hello,

    Basically I want to add an image in php template which would open in a lightbox, not in a new tab.

    Kind regards.
    Mindaugas

    #737784

    Labas 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!
    Yigit

    #737797

    Labas!

    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,
    Mindaugas

    #738900

    Any update on this?

    #739398

    Still waiting for an answer…

    #740104

    Hi,

    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,
    Ismael

    #740161

    Hello,
    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.

    #740491

    Hi!

    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

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