WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] get_query_var doe's not work with a form using method POST (1 post)

  1. Lucas Martins
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic