Exclude Content for Custom Post Type
-
Hello,
I’d like to exclude content from being indexed for one specific post type only. Is there a way I can utilize
relevanssi_index_content();
to do this? This filter seems to be global. Perhaps along the lines of:add_filter('relevanssi_index_content', 'contentoff'); function contentoff() { if( get_post_type() == 'CPT' ) { return false; } else { return true; } }
Although I know get_post_type() must be the wrong function to use here. Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Exclude Content for Custom Post Type’ is closed to new replies.