-
AuthorPosts
-
August 26, 2019 at 11:34 am #1130913
Hello,
I have the same issue that in this topic
but I didn’t use any third part plugin.
I have a page that is containing text and several images.
On one of them, I need a lightbox, but when I use lightbox in front, I see arrows and I can see in the same lighbox all other images of the page.I need to limit the lightbox to the image I want and not to group all the images of the page.
I try the solution from the topic, with debug mode and post-entry class, but that doesn’t work.
And idea ?
Caroline
August 26, 2019 at 12:06 pm #1130931best would be to see your site :
but if i understand it right : you have the images not as image alb element but you have it in text-block alb inserted different images?so if you only wants to get rid of gallery function for those images and on a specific page only – you need your page-id
here in my example code it is the : 5put the code ( change the page id) to your child-theme functions.php:
function popup_no_gallery() { if( is_page(5) ) { ?> <script type="text/javascript"> (function($){ $(window).load(function(){ $('a.lightbox-added').magnificPopup({ type: 'image', mainClass: 'avia-popup mfp-zoom-in mfp-image-loaded anchor-link', preloader: true, midClick: true, gallery: { enabled: false }, }); }); })(jQuery); </script> <?php } } add_action('wp_footer', 'popup_no_gallery');August 26, 2019 at 12:11 pm #1130934Thanks for the answer,
here is the link to the pageI need that the recipe display alone in the lightbox, but, another image come with it.
Is your answer still adapted ?
Caroline
-
This reply was modified 6 years, 2 months ago by
carosch.
August 26, 2019 at 12:14 pm #1130938Ok, I try, it’s cool, that works, thanks a lot!
August 26, 2019 at 12:19 pm #1130943your welcome
August 26, 2019 at 6:28 pm #1131075Hi,
I’m glad you got the help you need. If you need additional help please don’t hesitate to return to the forums.
Best regards,
Jordan Shannon -
This reply was modified 6 years, 2 months ago by
-
AuthorPosts
- The topic ‘Need to show only one image in the lightbox’ is closed to new replies.
