Alecaddd / Sunset-theme

Premium WordPress theme built during this series of tutorials: https://www.youtube.com/playlist?list=PLriKzYyLb28kpEnFFi9_vJWPf5-_7d3rX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gallery post format thumbnail issue when loaded from Ajax

moe-moaid opened this issue · comments

The Post "gallery" doesn't behave normally, there is another issue here:
the thumbnails don't show when the gallery post format is loaded using the loading button, however, if the post is showing on the page without loading i.e. the posted limit per page allows it, or the particular page which contains the post is refreshed, then it works fine,

Suggested Solution

adding the following piece of code inside the setTimeout function which is present inside the success portion of the Ajax function:

/*reveal carousel thumbnail after ajax loading*/
$( carousel ).on('slid.bs.carousel', function(){
	sunset_get_bs_thumbs( carousel );
});
sunset_get_bs_thumbs( carousel );

Please note

this piece of code should be added outside any if-else functions,
right where the revealPosts(); function was added