Error message after adding character removal script

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Error message after adding character removal script

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32987
    ca_jmccolley30
    ca_jmccolley30
    Participant

    I tried to add the script to remove characters from search string in this article:
    https://knowledgebase.ajaxsearchpro.com/miscellaneous/other/replace-or-remove-characters-from-search-phrase
    The removal seems to be working but if I hit enter with nothing in the search box I get this error on the Woocommerce shop page:
    Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/dev.circuitassembly.com/public_html/wp-content/themes/divi-child/functions.php on line 40
    at the top of the results page.

    Can you please tell me what is wrong?

    Attachments:
    You must be logged in to view attached files.
    #32997
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    That script will not work with empty removals. Instead of the custom code for that, try the built in features here: https://i.imgur.com/HzlV4E0.png

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.