Search and results problems

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search and results problems

This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #20918
    gmightyquinn
    gmightyquinn
    Participant

    Nice plug-in. Here is my test page: http://www.gregquinn.com/lacontroller/audits-test/
    Two questions about the search:

    1. On page load, all my audit results show with their images etc. (currently 5 total) If I put in a search term in the search box (such as “older”) it returns one item. If I then click the black “X” to get rid of the search term none of the results are shown. How do I make it so when a user gets rid of the search term it shows all of the results again?

    2. I used the plug-in Advanced Custom Fields to create two fields: one for Year and a second for a Sub-Headline but when I put in a search term (such as “petroleum”) the search is not finding it, how do I correct this?

    #20930
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for your kind words!

    1. It is intended behavior, there is no option for that unfortunately. However using a custom code it might be possible. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_action('wp_footer', 'asp_show_default_results_on_empty');
    function asp_show_default_results_on_empty() {
        ?>
        <script>
        jQuery(function($){
          $('.proclose svg').on('click', function(){
            var $s = $(this).closest('.asp_m');
            var id = $s.data('id');
            var inst = $s.data('instance');
            if ( $s.find('input.orig').val() != '' )
              setTimeout(function(){
                  ASP.api(id, inst, 'searchFor', '');
              }, 300);
          });
        });
        </script>
        <?php
    }

    2. Make sure to select these custom fields for search, that should solve the issue.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20952
    gmightyquinn
    gmightyquinn
    Participant
    You cannot access this content.
    #20959
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20962
    gmightyquinn
    gmightyquinn
    Participant
    You cannot access this content.
    #20966
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you ver much.

    It seems to be working on my end, I did a few very specific tests to verify:
    – Test 1, ‘services dept 2018’: https://i.imgur.com/MZ211Cp.png
    – Test 2, ‘petroleum 2018’: https://i.imgur.com/Y9ZWx7i.png
    Those keywords are only present in the custom fields, so it appears to be searching and the audits correctly based on them. Can you please check?

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21041
    gmightyquinn
    gmightyquinn
    Participant

    sorry for the delay, I had some deadlines. It is working but for some reason, I was using the search term “Aging” and it was not finding it. But my other searches have worked. Also, I was wondering our search seems very slow, is there any way to speed it up?

    #21053
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sorry for the late response, we were on a short family vacation.

    The plugin performance is mostly server dependent, but there are number of things you can try to change within the configuration to get the best out of it. Check this documentation section for all the details.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.