get_query_var doe’s not work with a form using method POST
-
I’m trying to use the following code to build a ‘recommend’ page, but when I click the send button (form using method POST), the get_query_var does not return the correct value.
function recommend_redirect() { if(intval(get_query_var('recommend')) == 1) { remove_all_filters('the_content'); add_filter('the_content', 'recommend_content'); add_filter('the_title', 'recommend_title'); add_filter('comments_template', 'recommend_comments'); } }
How to solve this?
Thanks========== EDIT ==============
Problem solved.
I had a input called “recommend” and it’s value was rewriting the URL “recommend” variable.
- The topic ‘get_query_var doe’s not work with a form using method POST’ is closed to new replies.