Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to develop a plug-in that has a search field and uses WP_List_Table. The plug-in is strictly for the backend and searches the users in the database and returns them along with some other meta from an additional plug-in.

When I do a search for the user the hidden input fields of _wpnonce and _wp_http_referer are added to the url string. The _wpnonce is not that big of a deal but the _wp_http_referer is a problem.

If the person using the plug-in keeps doing multiple searches the _wp_http_referer string becomes so long in the URL that it gives an error: Request-URI Too Large The requested URL's length exceeds the capacity limit for this server.

So how do I either stop the hidden values from appearing in the URL or reset _wp_http_referer each time the search button is clicked?

share|improve this question
Which table class you are extending? This doesn't seem like something root WP_List_Table does. –  Rarst Oct 9 '12 at 22:23
I am extending the WP_List_Table. I am using the search_box() to search the users in the database. I have this and the display() wrapped in a form with method="get" and action="". Everything works it displays table fine, returns data fine. But I during testing every time I search the _wp_http_referer gets added to the previous one. And appears in the URL. –  Ken Oct 10 '12 at 14:57
How much control do you have over the code that's generating the form? Can't you use POST instead of GET? Can't you filter out the '_wp_http_referer' parameter from the previous URL? –  tbuteler Oct 12 '12 at 0:40
I tried to follow what the core was using and that was GET. POST kept the url clean but when I tried it would return nothing in the list. –  Ken Oct 12 '12 at 4:17
take a look at wp-admin/edit.php it checks for any actions and removes the query arguments then redirects. I've added a filter on the init action to do something similar. –  Cristian Nov 21 '12 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.