Support » Plugin: Code Snippets » Search within snippets list does not work right

  • Hi,

    I have a list of 130 snippets and when I try to use the snippets search:

    for example with the search term “target”, then the list of snippets shows me 62 snippets, but in most of them the term “target” does not exist at all.

    So it is very hard for me, to search now in all 62 snippets, where my search term “target” really exists.

    I don’t know, since what version of the plugin this happens, but I know for sure, that this was not an issue in the past.

    Any idea please what this could be?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Shea Bunge



    The search function looks through every field fore for each snippet, including its code. Is it possible that the string ‘target’ is present somewhere within your code in those snippets?

    Ahhh yes, thanks, I found it:
    In the description field I often add the source, where I have found the snippet and gave that link a "target="_blank"

    Is it possible to exclude from within the snippets search the description field in a way?

    Plugin Author Shea Bunge


    Unfortunatey, thats’s not possible at the moment. I can definitely see if I can implement better search controls in the future which allow you to specify which fields you want to exclude, but it’s not a possibility at this time.

    Perhaps you could try using a database administration tool like phpMyAdmin, Adminer, or Sequel Pro to search through snippets using an SQL query? Here’s an example:

    SELECT * FROM wp_snippets WHERE name LIKE '%target%';

    thank you, but I am not a coder, so I don’t know how to use this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search within snippets list does not work right’ is closed to new replies.