I want to create a function for wordpress that display a particular banner only if certain search terms stored in array are entered into the search box.
So for example if i entered the string “yellow” I would get a banner and search results for that string because it is in the array
But if i entered the string “orange” I would only get search terms
not too sure where to start with this so any help would be much appreciated
Cheers
Daniel Wakefield
Web Designer Cheshire
To check if a word exists within a search term, add each searched word into an array using explode(). Then use in_array() to see if that word exists.