Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #33988, comment 1


Ignore:
Timestamp:
09/30/2015 12:05:20 AM (11 years ago)
Author:
DrewAPicture

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33988, comment 1

    initial v1  
    33Use `search_terms`. `get_posts( array( 'search_terms' => array( 'tiger', 'lion', 'dog' ) ) )`
    44
    5 I like the idea of `NOT LIKE` searches, but I wonder if we can come up with a more elegant syntax than 'without_s'. For example, we have 'search_terms'; maybe we could add something like 'search_terms__not_in'. Or maybe we could add boolean operators to the search, so that `'search_terms' => array( '-tiger', 'lion' )` will match posts *with* 'lion' but *without* 'tiger'. See https://support.google.com/websearch/answer/2466433?hl=en for a list of what Google supports.
     5I like the idea of `NOT LIKE` searches, but I wonder if we can come up with a more elegant syntax than 'without_s'. For example, we have 'search_terms'; maybe we could add something like `'search_terms__not_in'`. Or maybe we could add boolean operators to the search, so that `'search_terms' => array( '-tiger', 'lion' )` will match posts *with* 'lion' but *without* 'tiger'. See https://support.google.com/websearch/answer/2466433?hl=en for a list of what Google supports.