• Hello, i got 2 dropdown lists that shows some different categories, once you click on the wanted category it displays all the posts relative to the category choosed..
    Now I’d like to change how the thing work,
    I’d like to add a submit button that when it’s clicked will show all the posts that are in the category of the 1st dropdownlist AND on the 2nd dropdownlist too.
    I found that I need to use the query_post() comand, but have no clue on how to add it in my current code, here it is :

    <div id="categories">
        <h3 class="module-title">Plateforme</h3>
        <ul class="fix">
    
    	<form action="<?php bloginfo('url'); ?>/" method="get" style="display:inline;float:left">
    	<?php
    	$select = wp_dropdown_categories('show_option_none=Arcade&orderby=name&show_count=1&title_li=&include=1&echo=0');
    	$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    	echo $select;
    	?>
    	</form>
    
    	<form action="<?php bloginfo('url'); ?>/" method="get" style="display:inline;float:left">
    	<?php
    	$select = wp_dropdown_categories('show_option_none=Consoles&orderby=name&child_of=3&show_count=1&title_li=&echo=0');
    	$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    	echo $select;
    	?>
    	</form>
    	<noscript><div><input type="submit" value="View" /></div></noscript>
    	 </ul>
    
    </div>

    Is someone can help me to clear the things a little bit?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘managing query_posts and dropdown lists’ is closed to new replies.