Support » Plugin: WordPress Infinite Scroll - Ajax Load More » Search not working

  • Resolved chraromojo


    I have just updated to the latest version of ALM, unfortunately all my search queries have stopped working. For example:

    [ajax_load_more id=”938746746″ search=”programming” button_label=”View More”]

    This no longer searches for “programming” – it just displays all posts.

    I have tested this out and it is affecting all my queries that contain the search function.

    Looking through the changelog does it have something to do with: Update – Improving the Ajax headers that are sent with each query – ALM now only sends relevant query params via GET request?

    I say this as it seems my url parameters are not being taken in to account in the search results.

    • This topic was modified 1 year, 9 months ago by chraromojo.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author dcooney


    Hi @chraromojo,
    This is indeed a bug, thanks for reporting this.

    I’m going to release a fix later today or tomorrow am, in the meantime if you want to fix it on your copy of the plugin…

    Line #647, replace

    $ajaxloadmore .= (!empty($custom_args)) ? ' data-search="'.$search.'"' : '';
    $ajaxloadmore .= (!empty($search)) ? ' data-search="'.$search.'"' : '';

    Hello darren, I’ve used the above correction code, but the search does not show any results.
    I am using the following code in search.php template:

    $term = $term['s'];
       echo do_shortcode('[ajax_load_more container_type="div" repeater="repeater2" post_type="perfil" posts_per_page="4" search="'. $term .'" scroll="true"]');

    I look forward to your update, thank you very much for the support.

    Plugin Author dcooney


    @artmaug Im not sure what that issue would be then. Is $term being passed?

    Yes darren, the query shows the number of results, but Ajax Load More just start and does not load posts.

    I thank for any help I can give, I really do not know what happened, because everything was ok before the update.

    Plugin Author dcooney


    Ill need to see a link

    Sorry darren, It is currently on localhost.
    I await your update, while this will check all the work here again.
    Sorry for the disturbance and thanks for the quick reply.

    Plugin Author dcooney


    Sure, but the update only includes the fix I listed above.

    Thank you @dcooney I appreciate your prompt fix. I have tested this code and it works. My boss had just issued me a ticket to replace this plugin so it is a huge relief that you have found a fix. I will be sure to leave you a positive review.

    • This reply was modified 1 year, 9 months ago by chraromojo.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search not working’ is closed to new replies.