title: WordPress Pagination not working with AJAX
body: <p>I'm loading some posts though AJAX and my WordPress pagination is using the following function to calculate paging:</p>
  
  <pre><code>get_pagenum_link($paged - 1)
  </code></pre>
  
  <p>The issue is that the pagination is getting created through AJAX so it's making this link look like: <code>http://localhost:1234/vendor_new/wp-admin/admin-ajax.php</code></p>
  
  <p>However the actual URL that I'm trying to achieve is for this:
  <code>http://localhost:1234/vendor_new/display-vendor-results</code></p>
  
  <p>Is there a way to use this function with AJAX and still get the correct URL for paging?</p>