• EKOV?ELA?

    (@ekovcelar)


    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
    Radomir

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Amit Singh

    (@apprimit)

    Hello @ekovcelar,

    Thank you very much for your suggestion. We will definitely consider it.

    Thread Starter EKOV?ELA?

    (@ekovcelar)

    Thank you for reply.
    May be, the simple removing of this link will not be possible. May be, the infinite scroll will not work after that. I am not sure. Therefore I tried another possibility: adding rel=”nofollow” to that link. This works fine for me.
    Radomir

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove newer-posts by infinite scroll’ is closed to new replies.