Last active
October 21, 2024 20:26
-
-
Save rafaehlers/a0b13a544ad248d53aab8eee734051c2 to your computer and use it in GitHub Desktop.
Returns an exact match
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // DO NOT copy this line | |
| function gv_search_operator( $operator, $filter = array(), $context = null ){ | |
| return 'is'; | |
| } | |
| add_filter( 'gravityview_search_operator', 'gv_search_operator'); | |
| // This disallows empty field values (It must be used in conjunction with the filter above) | |
| add_filter( 'gravityview/search/ignore-empty-values', function() { | |
| return false; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related: https://docs.gravityview.co/article/210-where-to-put-code-samples