wordpress-ajax-posts-loader icon indicating copy to clipboard operation
wordpress-ajax-posts-loader copied to clipboard

Error occured in Search Results page

Open NicoBlandel opened this issue 10 years ago • 4 comments

Hi, thanks for your plugin. I just discover an error on my search results page. I understood that the JS only works for rewrited URL when finishing like "/page/2/" but on a search page, we have an URL like "/page/2/?s=search_tag&<other_get_vars>". So I changed reg exp in byscripts_ajax_posts_loader.js. I replaced : var next_link = page_link_model.replace(/\d+(/)?$/, page_number_next + '$1'); By : var next_link = page_link_model.replace(//page/\d*?//, "/page/"+page_number_next+"/"); It works fine in my case but I don't if it works for all. Can you tell me if you have another solution and update your plugin ? Have a good day, Nico

NicoBlandel avatar Apr 01 '15 11:04 NicoBlandel

Hi Nico, thanks for posting this solution. I ran into the same problem and your fix worked like a charm!

karlikdesign avatar Oct 31 '15 00:10 karlikdesign

Hi I have problem with blog page its shows me An error occured. Could not load more posts.

resdeni avatar Jan 05 '16 19:01 resdeni

page/2 Failed to load resource: the server responded with a status of 404 (Not Found)

resdeni avatar Jan 05 '16 19:01 resdeni

This worked for me

var next_link = page_link_model.replace('9999999999', page_number_next);

ahmadajmi avatar May 03 '17 13:05 ahmadajmi