[Plugin:Infinite-Scroll] 'Breaks' permalink
-
I am not sure I would say it breaks them exactly, but any new posts that load via infinite scroll, the permalinks get messed up. I am doing this all locally for the time being so I can not link to a site, but I can included the behavior here in the post.
This is the code I have for each post on the front page (that are being loaded via infinite-scroll):
<div class="preview_image"> <div class="preview_data"> <?php $category = get_the_category(); ?> <div class="post-categories"><a href="<?php echo get_category_link($category[0]->cat_ID); ?>"><?php echo $category[0]->cat_name; ?></a></div> <p class="archive_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p> <div class="clearer"></div> </div> <a href="<?php the_permalink(); ?>" /> <?php echo get_preview_thumbnail(); ?> </a> </div>
That above makes each preview thumbnail a clickable link to the single post and that works for every post that loads before infinite scroll loads any.
Once infinite scroll loads additional posts I can no longer click the images to get the next posts. The archive_title is still clickable, but I would like to still be able to click the images.
Not sure why this is happening or if I am missing something but when inspecting the
<a>
elements, the ones that are loaded by infinite scroll are 0px by 0px and the ones that are originally loaded on the front page (not by I-S) have some size to them.
- The topic ‘[Plugin:Infinite-Scroll] 'Breaks' permalink’ is closed to new replies.