-
-
Save searchwpgists/1a6b1d35e31e957d2e4a95f6940e0ca2 to your computer and use it in GitHub Desktop.
Skip document processing for a specific Attachment in SearchWP
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 | |
| // Skip document processing for Attachment 14 in SearchWP. | |
| add_filter( 'searchwp\document\skip', function( $skip, $the_post ) { | |
| if ( 14 === $the_post->ID ) { | |
| return true; | |
| } | |
| return $skip; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment