Skip Navigation

[Resolved] URL for featured image – Bug when using infinite scroll

This support ticket is created 7 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by Ole Andreas Vekve 7 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#425347

I am trying to add an infinite scroll to the archive page for Home/Blog. Each post has a featured image, and when clicking on the image it's going to be loaded with lightbox. No additional text is being showed, only lightbox with possibility to go backwards and forwards.

This site was made earlier with only Types and it was working correctly. Then Infinite Scroll was added, and now it does not work well anymore.

It works great with the first posts. When clicking on the images, the featured image is being displayed correctly. But when scrolling and clicking on the new posts, the image does not turns up.

Please try: hidden link

The original PHP:

<div class="maximg opacity1 opacity05hover">
	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<div class="col-md-3 col-sm-6 item littluft">
            <?php $postid = get_the_ID(); ?>
        	<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
			<a href="<?php echo $feat_image ?>" rel="lightbox">
				<?php the_post_thumbnail('full-hd'); ?>
            </a>    
            
		</div>    
	</article>
</div>

Converted into:

<article>
    <div class="item col-md-3 col-sm-6 item littluft">
         <a href="[wpv-post-featured-image output='url' size='full-hd']" rel="lightbox">[wpv-post-featured-image size="full-hd" raw="false"]</a>
     </div>    
</article>

Do you see any bugs?

Looking forward to hear from you again,

#425354

Dear ole,

I just tested the URL you mentioned above in my chrome browser, I can see there are few JS errors occur:
Typekit: the domain "www.medusafoto.no" isn't in the list of published domains for kit

Then I click the first image, I see a blank lightbox window, then I scroll down the browser, I see two new images are being added to the result, click them, same as first image, I see a blank lightbox window. Actually, click any one of the images, no one lightbox can show an image.

So, the Views infinite scroll does work, but the lightbox does not as expected.

What I see is different from your description, can you check it? thanks

#425373

Hello,

Thank you for clearing that out.

That's wierd. I have testet it on several browsers and plattforms, no errors regarding the lightbox when not scrolled. I have however used

js_event_wpv_pagination_completed

now, so maybe it solved the problem.

Can you see if you see any differents now?

#425396
2.jpg
1.jpg

I tested again the problem URL with my chrome browser + Microsoft Edge, I can see the lightbox images are working,

When I scroll down the browser, I see two new images are being added to the result. see screenshot:
1.JPG
I clicked the two new images, both lightbox images are working, see screenshot:
2.JPG

Is this problem resolved? please let me know if you still need more assistance.

#425410

Thank you,

Then the issue has been resolved using the following:

js_event_wpv_pagination_completed
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.