Searching – $_POST[‘s’] gets cleared when t
-
Using WP’s search facility, I can enter a search term that will match only one result. When this happens, the matched post appears in its full form with comments, but for some reason the POST ‘s’ variable has been cleared.
This is a major annoyance, as I’m trying to add a title (something like ‘Search Results’) to my page if the user has performed a search. I tried if(!empty($s)) which for some reason didn’t work when only post was matched, so I inserted a debugging print_r($HTTP_POST_VARS); call, but this prints Array ( ) when only one post was matched.
Anyone come across something like this before?
The topic ‘Searching – $_POST[‘s’] gets cleared when t’ is closed to new replies.