Remove newer-posts by infinite scroll
-
Hello,
I use OceanWP on my Woocommmerce shop page.
I like the Infinity Scroll option for pagination of posts and in woocommerce pages.THE PROBLEM:
When is the Infinity Scroll option enabled, some analytics tool say, there is duplicite content on my site.
The reason:
For example some shop pages (brand, product category,…) contain products.
This pages has infinite scroll.
But at the end of the html page are links to …/page/2 included.
I know, this links are invisible.
But Google and analytics tools follow them and report duplicite content, because the products on the second page are the same as on the first page because of infinite scroll on both of them.MY SUGGESTION:
Change the infinite_pagination() function so it will not include this part in the html page.
Remove the last div block with the class infinite-scroll-nav:<div class=”infinite-scroll-nav clr”>
<div class=”alignleft newer-posts”><?php echo get_previous_posts_link(‘← ‘. esc_html__( ‘Newer Posts’, ‘oceanwp’ ) ); ?></div>
<div class=”alignright older-posts”><?php echo get_next_posts_link( esc_html__( ‘Older Posts’, ‘oceanwp’ ) .’ →’, $wp_query->max_num_pages ); ?></div>
</div>I removed this part in my child theme and everythig seems to work correctly.
Please remove it from the OceanWP theme too.Thank you
RadomirThe page I need help with: [log in to see the link]
- The topic ‘Remove newer-posts by infinite scroll’ is closed to new replies.