Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created March 29, 2022 15:06
Prevent input attributes (e.g. placeholder) from being indexed by SearchWP
<?php
// Prevent input attributes (e.g. placeholder) from being indexed by SearchWP.
add_filter( 'searchwp\valid_html_tags', function( $tags ) {
unset( $tags['input'] );
return $tags;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment