I want to allow users to sort a long list of posts (that are displayed on multiple pages) by custom fields.
Here is my form…
<form method="post" id="order">
<select name="sort" onchange='this.form.submit()'>
<option value="">Sort by</option>
<option value="zip">Sort by Zip Code</option>
<option value="type">Sort by Property Type</option>
</select>
</form>
I was told that I need to use sessions. However, I don’t know how to code this. Could anyone give me an example based on the form above?
You can add a query to the URL in WordPress, and then just link to that query, see â http://codex.wordpress.org/Function_Reference/add_query_arg