Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Forum: Themes and Templates
    In reply to: drop down menu

    Hello Bolpinger,

    You wrote: I just added the ul li drop down list and am trying to figure out how to get it to show.
    This sounds, as if you inserted the list by hand. Hardcoded in the tmplate-file.
    You should use the functions, to register a navigation-menu. Then you can call the menu in the template, where you want to show the menu.
    Did you read this: http://codex.wordpress.org/Navigation_Menus
    and: http://codex.wordpress.org/Function_Reference/register_nav_menu

    You can realise the dropdown with css, but with js it would be possible, to animate it in a better way.

    Thread Starter paka

    (@paka)

    Hello and thanks thereformation,

    it looks, as if this is exactly what I’m looking for.
    I will try this later this evening.

    Greets

    Paka

    Thread Starter paka

    (@paka)

    Solved,
    two days I was searching for a solution, not one hour after I post here, I’ve found it.
    The GET has to look like: ?s=ball&post_type=as_post_product&as_tax_product=Spielzeug. Spielzeug is the name of the product group.

    So I insert a select myself:

    $taxProductCats = get_categories(array('taxonomy' => $taxName )) ;
    myVarDump($taxProductCats , 'liste der Produkt gruppen') ;
    ?>
    	<form id="searchform" action="<?php bloginfo('url'); ?>/" method="get">
    	<input id="s" maxlength="150" name="s" size="20" type="text" value="" class="txt" />
    	<input name="post_type" type="hidden" value="<?php echo $postType ?>" />
    	<select name="<?php echo $taxName ?>">
    	<?php
    		foreach ($taxProductCats as $prodCatobjkt){
    			echo '<option value="'.$prodCatobjkt->name.'">'.$prodCatobjkt->name.'</option>' ;
    		}
    	?>
    	</select>
    	<input id="searchsubmit" class="btn" type="submit" value="Search" />
    	</form>

    No more messages, and all searched products are found.
    Wonderfull.

    Hi,
    try to delete the Plugin files via FTP.

    chiao
    Paka

    Thread Starter paka

    (@paka)

    Hello,

    This looks exactly like the thing I was looking for.

    Thanks

    Thread Starter paka

    (@paka)

    Hello Mark / t31os
    tank you, this was quick.

    It works, the only thing, I had to change from your posted code was, that I had to change the name attribute too, to get an array $_POST[‘cat’] instead of only one value. It has to be name=’cat[]’. But this is only a xhtml detail, the point was, to use str_replace on the return value of wp_dropdown_categories.
    The code I use now is this:

    $select_cats = wp_dropdown_categories( array( 'echo' => 0 ) );
    $select_cats = str_replace( "name='cat' id=", "name='cat[]' multiple='multiple' id=", $select_cats );

    Thread Starter paka

    (@paka)

    Second problem solved.

    I found the tables, to select the categories,:-) but this was’nt the reason, why I posted this question.
    You find the categories and tell them from tags, with the tables wp_terms and wp_term_taxonomy.

    It would be nice, if there is a solution to the first one, because I would prefer a WP function, and this is, why I asked.

    Hopefull
    Paka

Viewing 7 replies - 16 through 22 (of 22 total)