I'm using the following code with query_posts to put together a custom search:
$args = array(
'post_type' => 'species',
'meta_query' => $meta_query,
'tax_query' => $tax_query
);
$meta_query is put together with a few segments of code like this:
if (!empty($_POST["s_aquarium_H"])) {
$val = convert_values('size', $size, $_POST["s_aquarium_H"]);
$aquarium_H = array(
'key' => 'aquarium_H',
'value' => $val,
'type' => 'numeric',
'compare' => '<='
);
$meta_query[] = $aquarium_H;
}
This works perfectly well and is accessed by visiting /advanced-search/.
However, my pagination does not. When you click Next Entries, the URL changes to /advanced-search/page/2/ but simply re-opens the Advanced Search form.
I guess this is because I'm using $_POST. Is there a way of using pagination with $_POST or do I need to change my code to get_query_var or something?
EDIT
My rewrite rules appear to be correct: /advanced-search/page/2/ displays pagename: advanced-search, paged: 2 in Monkeyman's Rewrite Analyzer plugin.

FURTHER EDIT
My advanced-search.php page uses the following code to determine whether it should show the search form or the results. I guess this needs re-writing if I'm to use pagination:
<?php if ( isset( $_POST["act"] ) && $_POST["act"] == "s" ) : ?>
Does anyone have any ideas as to how I could go about rewriting this? I guess GET instead of POST needs to be used?
Thanks in advance,
wp_die('<pre>'.print_r($args,true).'</pre>');if no posts are found? etc Give as much information about what the values of all variables are on failure and the path the code is taking – Tom J Nowell Apr 5 '12 at 10:57$argsare displaying correctly in every instance - it's only when I click thePrevious Entriesbutton that everything goes wrong. I've added another edit to my OP with my suspicions. Could you have a look and see what you think? – dunc Apr 8 '12 at 20:52