Support » Fixing WordPress » get_query_var doe’s not work with a form using method POST

  • Resolved Lucas Martins


    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) {
    		add_filter('the_content', 'recommend_content');
    		add_filter('the_title', 'recommend_title');
    		add_filter('comments_template', 'recommend_comments');

    How to solve this?

    ========== 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.