I have a custom post type which has a custom taxonomy called "Financial Sector".
I am trying to display a select box on the home page of my site so that users can select a Financial Sector and it takes you to that page.
Here is the code I am using to populate the select box.
<form class="fin-form-select" action="<?php bloginfo('url'); ?>/" method="get"> <label for="choose-fin">Search by Product.</label> <?php $select = wp_dropdown_categories( 'taxonomy=financial- sector &name=financial-sector &show_option_all=Please Choose... &show_count=0 &orderby=name &order=ASC &echo=0 '); $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select); echo $select; ?> <noscript><input class="rtd-btn primary" type="submit" value="View" /> </noscript> </form>
The problem I am having is that when you choose a selection, the link goes to a 404 page. I have flushed the permalinks and still no joy.
Can anybody supply me with a fix or a better way of achieving my goal.