This PHP code once added to the end of your child themes functions.php file excludes all pages from inclusion in the search results when using the native WordPress search function.
The code below only excludes an array of specific post I.D’s from the search results.
Leave a Reply
You must be logged in to post a comment.