Title: Next Page Addon issue.
Last modified: February 5, 2020

---

# Next Page Addon issue.

 *  Resolved [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/)
 * I use Ajax load more with Next Page addon. it load pages without Next button 
   click. Like
    example.com/artcile-name example.com/artcile-name/2 example.com/
   artcile-name/3 … example.com/artcile-name/10
 * Now if a user open example.com/artcile-name/5 page it load page from /5 location
   but it also /2 /3 /4 page on top of that. Is there any way possible not to load
   previous slides of pages when A user is opting to load a particular page. Just
   load /5 and slides after that?
 * PS: why it is necessary: in above example if page /5 is loaded all the ad loaded
   before on first page /2,/3,/4 are never viewed by anyone hence it become a very
   huge issue.

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/next-page-addon-issue/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/next-page-addon-issue/page/2/?output_format=md)

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402714)
 * Hi [@fropki](https://wordpress.org/support/users/fropki/) How would a user ever
   view page 1, 2,3, 4 etc if they were not loaded at page load? This is a problem
   i’ve been trying to work though.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402718)
 * What if website do not want to show them first /2 /3 /4 page in case he opted
   to open /5
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402729)
 * Yes, this is exactly the issue I’ve been trying to work through.
 * So, what if they did want to view page 2?
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402731)
 * again for example. Think of it as a crawler issue. E.g. Google Adsense Bot.
 * User visit a page which has 30 page. Website show 1 ad every 2 slide. Now A user
   has clicked on ad on 15th page. example.com/article-apge/15. Google will visit/
   15 page but all the ad before that will also be loaded. So website will get very
   less revenue in this case.
 * So there should be an option for website to decide whether they want to show 
   slides before that or not.
    -  This reply was modified 6 years, 7 months ago by [Fropky](https://wordpress.org/support/users/fropki/).
    -  This reply was modified 6 years, 7 months ago by [Fropky](https://wordpress.org/support/users/fropki/).
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402757)
 * Yea not ideal. A setting might be a good solution for this.
    A user could never
   reach page 14 though, if they loaded page 15 for example.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402761)
 * Can you please send me an option to change in code? I would love to try it as
   an experiment for my live site?
    -  This reply was modified 6 years, 7 months ago by [Fropky](https://wordpress.org/support/users/fropki/).
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402769)
 * I don’t have anything ready or tested, but I can have a look tomorrow for you.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402773)
 * Thanks. I will wait for piece of code.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402784)
 * I can’t guarantee I’ll have it solved by tomorrow.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12402788)
 * I fully understand. I will wait patiently.
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12407617)
 * [@fropki](https://wordpress.org/support/users/fropki/)
 * I was able to solve this.
 * in `/core/classes/class.alm-shortcode.php` line 1050
 * Add the following:
    `$nextpage_is_paged = apply_filters('alm_nextpage_paged',
   $nextpage_is_paged);`
 * Then in your functions php.
 *     ```
       add_filter('alm_nextpage_paged', function(){
       	return false;
       });
       ```
   
 * Let me know how that works.
    I’ll be including this in the next ALM release.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12408315)
 * Thanks D. It is working perfectly fine.
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12408351)
 * Just a small issue. I am still using Jquery version. Your solution work find.
   Except 1 console error in chrome.
 * alm-next-page.min.js?ver=1.2.0:1 Uncaught TypeError: Cannot read property ‘top’
   of undefined
    at Object.almNextPage.init (alm-next-page.min.js?ver=1.2.0:1) at
   HTMLDocument.<anonymous> (alm-next-page.min.js?ver=1.2.0:1) at i (jquery.js?ver
   =1.12.4-wp:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
   at Function.ready (jquery.js?ver=1.12.4-wp:2) at HTMLDocument.J (jquery.js?ver
   =1.12.4-wp:2) at HTMLDocument.c (rocket-loader.min.js:1) at l (rocket-loader.
   min.js:1) at t.simulateStateAfterDeferScriptsActivation (rocket-loader.min.js:
   1) at Object.callback (rocket-loader.min.js:1)
    -  This reply was modified 6 years, 7 months ago by [Fropky](https://wordpress.org/support/users/fropki/).
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12408399)
 * Do I need to remove this piece of code
 *  if(startPage > 1){ // Move user to current page on page load.
    var top = $(‘.
   alm-nextpage[data-id=’+startPage+’]’).offset().top – startPageOffset + 5; $(‘
   html, body’).animate({ scrollTop: top +’px’ }, 1, function(){ almNextPage.popstate
   = false; }); }
 *  Thread Starter [Fropky](https://wordpress.org/support/users/fropki/)
 * (@fropki)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/next-page-addon-issue/#post-12409643)
 * or Do we need to assign anything else of this variable
    var top = $(‘.alm-nextpage[
   data-id=’+startPage+’]’).offset().top – startPageOffset + 5;

Viewing 15 replies - 1 through 15 (of 21 total)

1 [2](https://wordpress.org/support/topic/next-page-addon-issue/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/next-page-addon-issue/page/2/?output_format=md)

 The topic ‘Next Page Addon issue.’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

 * 21 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/next-page-addon-issue/page/2/#post-12502998)
 * Status: resolved