Support » Plugin: WP-PageNavi » [Plugin: WP-PageNavi] Custom query and form submit

  • Resolved osterman


    I’m trying to create a custom query from a form submit with two dropdown boxes. The form is sending the $region and $job as POST vars.

    This is the custom query used in my template:

    query_posts( array(
    	'paged' => get_query_var('paged'),
    	'orderby' => 'title',
    	'posts_per_page' => 25,
    	'order' => 'ASC',
    	'category__and' => array( $region, $job ) ) );

    The first page with results works fine but when i navigate to page 2,3,4 etc they are blank. I would greatly appreciate any help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author scribu


    It depends if you’re on a custom page template or in some other theme file:

    I’m using a custom page template and I’ve tried using both “get_query_var(‘page’)” and “get_query_var(‘paged’)” like your example shows and I get the same result.

    Plugin Author scribu


    Ah… well, the thing is that POST variables are not transmitted when you click on the links generated by WP-PageNavi.

    You would have to either:

    a) make each link an actual <form> element with hidden inputs that pass the data.


    b) use GET variables instead.

    Thank you! That did it!
    I tried the GET version and that did the trick!

    I’m in the same situation. I don’t want to use the GET variables, so how would I go about making each link an actual form element, like you suggested?


    Hi rereradu,
    I also dont want to use GET variables. How do you created each link as an form element.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP-PageNavi] Custom query and form submit’ is closed to new replies.