Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #588686

    Hi,

    I have a single post (no ALB used) with featured image and in the content another image(s):
    http://screencloud.net/v/80xn

    When I click on one of those single images, the lightbox shows all other images from this post, too, including the featured image.
    a) http://screencloud.net/v/lSK1
    b) http://screencloud.net/v/vF3s

    How can I do it, so that clicking on a single image shows in its lightbox view only this one image?

    Note: not only the featured image should be excluded from the lightbox view of single images, but also other single images in the post’s content. I mean: clicking on 1 image in the content should only show in its lightbox only this 1 image.

    Thank you.

    #590177

    Hi COLORIT!

    Thank you for using Enfold.

    Please try this in the functions.php file:

    // custom lightbox
    add_action('wp_footer', 'ava_custom_lightbox');
    function ava_custom_lightbox(){
    ?>
    <script type="text/javascript">
    (function($) {
    	$(window).load(function() {
    		$('.single a').magnificPopup({
    			type: 'image'
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }

    If it doesn’t work, a link to the site will help.

    Related thread: https://kriesi.at/support/topic/icon-list-7/#post-586615

    Regards,
    Ismael

    #635599

    sorry for the delay, I tested your code, it works partly, and only together with the CSS that you referred to in your link above:

    Goes to the functions.php:

    // custom lightbox
    add_action('wp_footer', 'ava_custom_lightbox');
    function ava_custom_lightbox(){
    ?>
    <script type="text/javascript">
    (function($) {
    	$(window).load(function() {
    		$('.single a').magnificPopup({
    			type: 'image'
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }

    and this needs to go to the custom.css:

    .mfp-ready .mfp-figure {
        opacity: 1;
    }

    But some things are not working now:

    1. the image popup shows now not the image title
    2. I cannot click the navigation items anymore. When I click on an menu item, then a warning comes “image could not be loaded”

    Please see test post link in private content. Thank you.

    #636479

    Hi,

    1.) Not sure what you meant by that, clicking on the image seems to open the lightbox properly. Could you please provide a screenshot?
    2.) Clicking on the link should display a single image, there is no navigation to click on.

    Best regards,
    Ismael

    #636677

    Hi Ismael,

    According to 1.)

    I defined a title for this image, but this title does not appear in the lightbox:
    Title is defined:
    <a href="https://xyz.de/wp-content/uploads/2016/05/papierarbeit-001.jpg"><img class="alignleft size-square wp-image-3287" src="https://xyz.de/wp-content/uploads/2016/05/papierarbeit-001-180x180.jpg" alt="papierarbeit-001" width="180" height="180" title="Papierarbeit 1"></a>

    but in the lightbox no image title appear (in my example above: “Papierarbeit 1”):
    http://screencloud.net/v/4mol

    According to 2.)
    This is, what happend, when I click at the main menu “Kontakt” when I’m on the test post:
    a grey overlay appears trying to open I don’t know what … but does not lead my to the contact page:
    http://screencloud.net/v/iGII

    #637418

    Hi,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    Login credentials include:

    • the URL to the login screen
    • a valid username (with full administration capabilities)
    • as well as a password for that username

    Best regards,
    Andy

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