Created
July 8, 2015 14:59
-
-
Save ericakfranz/4ca93ae068fe15eadcfc to your computer and use it in GitHub Desktop.
Remove optins from search results when using the old WordPress-only OptinMonster plugin.
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 optin_monster_exclude_from_search( $args ) { | |
$args['exclude_from_search'] = true; | |
return $args; | |
} | |
add_filter( 'optin_monster_post_type_args', 'optin_monster_exclude_from_search' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment