Working on a WordPress site. I need to create a navigation bar that is a form with two select boxes, and use their values to build a URL.

<form method="get" action="">
 <select>
   <option value="parent-1">Parent 1</option>
   <option value="parent-2">Parent 2</option>
   <option value="parent-3">Parent 3</option>
 </select>
 <select>
   <option value="child-a">Child A</option>
   <option value="child-b">Child B</option>
   <option value="child-c">Child C</option>
 </select>
 <input type="submit" value="go">
</form>

I would like to make selections, submit this form, and point my browser to, for instance, this: http://mywebsite.com/parent-2/child-c

Would also love to have this be dynamic using $get_post or other WordPress variables, but one step at a time.

Read more here: Create and submit link using two select drop down values


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: