• So right now I have the site where it shows a list of posts with a filter (ajax version) on the left. When I select a filter and press filter, I click on a post. When I click back using a browser data it shows all the posts but the filter is still checked. How could I have it where you click back on the browser and it re-filter the filters that are already checked?

    https://wordpress.org/plugins/ultimate-wp-query-search-filter/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TC.K

    (@wp_dummy)

    You can try add this to your header or footer

    <script type="text/javascript">
    
    		function resetForm() {
    			$('[id^=uwpqsffrom_]').each(function(){
    				this.reset();
    			});
    		}
    
                  resetForm();
    })
    </script>

    Thread Starter thnkling

    (@thnkling)

    Hmm, I think you misunderstood my question. Sorry for confusing you, but at least now we know how to reset the form 😛

    So if you press the browser back button and on document ready you get the values of the checked form and filter based on those. How would you do that programmatically?

    Plugin Author TC.K

    (@wp_dummy)

    Then you will need to use javascript to achieve this, because this is a client side problem.
    This is complicated, and out of the plugin scope.
    Or you can use the default template, it will not have this problem.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Storing ajax variables?’ is closed to new replies.