Created
August 12, 2014 07:03
-
-
Save SirDarcanos/8ca1b1b33ab791836a59 to your computer and use it in GitHub Desktop.
Change post types to exclude from WP/WC searches by post content
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
function wc_filter_search_add_post_type( $array ) { | |
array_push( $array, 'your_post_type' ); | |
array_push( $array, 'another_post_type' ); | |
array_push( $array, 'etc' ); | |
return array; | |
} | |
add_filter( 'wc_filter_search_not_allowed_array', 'wc_filter_search_add_post_type' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment