How do you insert a jump menu for categories on a wp page

How do you insert a jump menu for categories on a wp page.

If I wanted to have a jump menu on a page showing all the categories or sub-categories, can this be done?

I tried html code but there is a js script in the <head> that I don’t know where that goes on a wp page, or if it goes in another file like the functions.php? Below is the html and js code I am trying to use. However if there is an easier way then please advise. Thanks.

NOTE: not all the variables are included like the URL link, this is just an example. Also note that when I tried it of course the links didn’t work because the javascript was missing.

‘<html>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

<title>Untitled Document</title>

<script type=”text/javascript”>

function MM_jumpMenu(targ,selObj,restore){ //v3.0

eval(targ+”.location='”+selObj.options[selObj.selectedIndex].value+”‘”:wink:;

if (restore) selObj.selectedIndex=0;

}

</script>

</head>

<body>

<form name=”form” id=”form”>

<select name=”jumpMenu” id=”jumpMenu” onChange=”MM_jumpMenu(‘parent’,this,0)”>

<option value=”vvv”>item1</option>

</select>

</form>

</body>

</html>

  • Paul Barthmaier
    • Code Wrangler

    Hi there,

    Ummmm, jump menu? How about a widget. If you go to Dashboard > Appearance > Widgets, you’ll see the category widget on the left side and containers for the available page locations on the right. When you drag the widget over and into a container, you’ll see that you can name the widget, and if you click all 3 checkboxes, it’ll look just like a jump menu! Wow. Cool, huh

    Cheers,

    Paulc

  • thevillageblog
    • Site Builder, Child of Zeus

    Thanks but that is not what I am looking for. I need a jump menu on the wp page (Pages) not the sidebar. I tried the codex solutions for using javascript which the jumpmenu function calls for, but it does not work. It seems to be possible but I was hoping you could tell me specifically for Directory categories and not blog categories.

    Hope that clarifies it a little.

    Thanks.

  • PC
    • WPMU DEV Initiate

    Hiya,

    Greetings and thanks for being a great community member.

    We haven’t heard from you on this one for long and I am doing a regular followup to see if there is still something we can assist you on this thread.

    Just to manage the support issues more efficiently, I am marking this thread as resolved for now however this is not being done to avoid your questions in any ways.

    Please feel free to mark this is “Not resolved” in case you have further questions and we would be back on it.

    Thanks a lot for being with WPMU DEV.

    Cheers

    PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.