Tagged: content, featured image, Lightbox, post, single image
-
AuthorPosts
-
February 24, 2016 at 11:17 pm #588686
Hi,
I have a single post (no ALB used) with featured image and in the content another image(s):
http://screencloud.net/v/80xnWhen 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/vF3sHow 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.
February 27, 2016 at 7:48 am #590177Hi 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,
IsmaelMay 19, 2016 at 11:29 pm #635599sorry 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.
May 23, 2016 at 3:28 am #636479Hi,
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,
IsmaelMay 23, 2016 at 10:52 am #636677Hi 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/4molAccording 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/iGIIMay 24, 2016 at 1:02 pm #637418Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.