title: How can I filter / query wordpress posts using ajax, live?
body: <p>I have a Wordpress website, that has a number of posts, and a number of filters (with only the UI set up) in a theme that is a custom build. </p>
  
  <p>Want I want to  to do is change the query posts tags live using AJAX, so that the user can get the posts they want using the filters: </p>
  
  <ul>
  <li>Popularity (custom taxonomy) </li>
  <li>Time posted </li>
  <li>Tags </li>
  <li>Colour (custom), </li>
  <li>Keyword (using a search bar)  </li>
  <li>Category </li>
  </ul>
  
  <p>I have found a php script that does a similar thing, but not live, and does not give the ability to update live; this script is here that does the query.</p>
  
  <pre><code>&lt;?php if( !empty($_GET['order']) ) $order=$_GET['order'];
  else $order='DESC'; // default
  
  if( !empty($_GET['orderby']) ) $orderby=$_GET['orderby'];
  else $orderby = 'Date'; // default
  if( !empty($_GET['cat']) ) $orderby=$_GET['cat'];
  else $category = ''; // default
  
  
  query_posts('orderby='.$orderby.'&amp;order='.$order.'&amp;meta_key='.'_post_like_count'.'&amp;cat='.$category)
              ?&gt;
  </code></pre>
  
  <p>The script that does the changing (that changes the queries) is here, effectively an anchor that adds a url onto the the search term.</p>
  
  <pre><code>&lt;a href="?order=DESC&amp;orderby=meta_value_num"&gt;Popular&lt;/a&gt;
  </code></pre>
  
  <p>I have only done the querying for a few values, before I get the whole filtering system working, and I acknowledge that it may have to be completely re done, as I know that ajax cannot change the url live for the user, and has to use requests. </p>
  
  <p><strong>Does anyone know how I could approach this task in any way, and can someone give me some guidance on how to achieve it?</strong></p>
  
  <p>I am open to plugins, yet I would prefer integrating it locally into my custom theme build.</p>