• Resolved chraromojo

    (@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 6 years, 6 months ago by chraromojo.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Darren Cooney

    (@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…

    /plugins/ajax-load-more/core/classes/class.alm-shortcode.php
    Line #647, replace

    $ajaxloadmore .= (!empty($custom_args)) ? ' data-search="'.$search.'"' : '';
    with
    $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:

    <?php
    $term = $term['s'];
    if(!empty($term))
       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 Darren Cooney

    (@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 Darren Cooney

    (@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 Darren Cooney

    (@dcooney)

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

    Thread Starter chraromojo

    (@chraromojo)

    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 6 years, 6 months ago by chraromojo.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search not working’ is closed to new replies.