Archived topic
archive page + animated infinite scroll
6 replies · Started by Dmitry on May 26, 2020
Hi!
Whats the easiest way to make posts on archive pages appear with animation (for example, fadeIn). Infinite scroll is activated inside theme options.
Basically I use "Animate It" plugin, but it needs to put a specific class inside every element and the starting time for animation should be different for every element to make it look nice.
Hi there,
Does that plugin have any instructions we can look at? You should be able to add custom classes to your posts if that's how it works.
Let me know :)
Here it is https://wordpress.org/plugins/animate-it/
the problem is that animation of every post on archive page should start one after another depending on the number of loaded posts
Hmm, I'm not sure how that would work with posts/infinite scroll. It might be worth checking with them in case they have an idea.
Otherwise, we would need to make our infinite scroll args filterable (which is planned for 1.11.0) so you could add classes to posts as they are loaded.
Thanks! Whats the best way to add my classes to posts?
You can use the post_class filter, but it won't work for this. We need to filter the actual infinite scroll code for this kind of thing, which isn't possible at the moment.