Support » Plugin: Ajax Search Lite » Images not show on result

  • Hello I had managed to set up the search bar with all my preferences but somehow my website lost the settings and now my searches on Ajax Search Lite does not shown image result in suggestion neither featured image neither default image.
    From Image Options I have set it to “ON”.

    • This topic was modified 1 month, 2 weeks ago by adonispso.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    Well, I cannot see much from the front-end, but it seems like that no post type and no fields are selected under the General Options -> Sources panel: https://i.imgur.com/UCAy0oF.png

    Best,
    Ernest M.

    adonispso

    (@adonispso)

    I already had set up the custom post-types. As for the custom fields I haven’t select anything.

    https://websoft.co/wp-content/uploads/2019/12/Screenshot_2019-12-22-Ajax-Search-Lite-‹-WebSOFT-Group-Of-Companies-—-WordPress.png

    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    That is interesting. I have looked at the page source, and it looks like a 3rd party script is changing the checkbox behaviours in the search box itself. All checked checkboxes are rendered to have the .checked property set to false.
    The best solution would be to find and disable that 3rd party script, as that is a very bad practice, and will cause conflicts with other forms as well.

    Another possible solution might be to use a custom code to override that, it may work.

    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_try_fixing_checkboxes');
    function asp_try_fixing_checkboxes() {
      ?>
      <script>
      jQuery(function($){
        setTimeout(function(){
           jQuery('.wpdreams_asl_settings form input[checked]').each(function(){
              this.checked = true;
           });
        }, 2500);
      });
      </script>
      <?php
    }

    Best,
    Ernest M.

    adonispso

    (@adonispso)

    No didn’t help, it just cause a major error and droped the entire website.
    I also tried to uninstall and reinstall the plugin but nothing happended.

    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    The code is defitely correct, it should not cause any errors. Please make sure it is placed to the end of the functions.php file, and is not preceeded by any opening or closing PHP tags.
    It may still not work, but it should not cause a website down issue.

    If it wont’s do anything, then the only way is to find the underlying 3rd party script that changes the checkbox properties incorrectly.

    Best,
    Ernest M.

    adonispso

    (@adonispso)

    still same issue.
    I am putting the code into function.php with the path
    /websoft-co/wp-content/themes/cesis/functions.php

    there also another function.php file located into /websoft-co/wp-content/themes/cesis/functions/cesis_functions.php but with kind of different name.

    Should I also try to that file?

    …that file only include INCLUDE_ONCE(get_parent_theme_file_path(%)); php functions

    • This reply was modified 1 month ago by adonispso.
    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    I guess that the correct file is very likely this one: /websoft-co/wp-content/themes/cesis/functions.php

    I would not recommend using the other file though. Well, if you can share the file contents somehow (via gist.github or paste.ee), I might be able to send you the modified version.

    Best,
    Ernest M.

    Hello Ernest,

    Here is the secret gist link
    https://gist.github.com/adonispso/919249ba089da79a4b8a613230621b6f
    I have only added the functions.php if you need to see any other file, let me know.

    Plugin Author wpdreams

    (@wpdreams)

    Thank you, try this implemented version: https://gist.github.com/anag0/04a7431facc2d7b15b0a838480ce85ae

    The added code is on the bottom of the file. Please be careful when editing.

    thank you a lot it worked!

    But i notice that now it doesn’t take the post’s featured image as “Primary image source” of the result.

    Sorry, my mistake. Primary image source working fine!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.