Title: url string changes
Last modified: August 20, 2016

---

# url string changes

 *  [formica](https://wordpress.org/support/users/formica/)
 * (@formica)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/url-string-changes/)
 * Hi there
 * I’m listing taxonomies in a dropdown on a taxonomy template using this code :
 *     ```
       <?php
       function get_terms_dropdown($taxonomies, $args){
       	$myterms = get_terms($taxonomies, $args);
       	$output ="<select name='area'>";
       	foreach($myterms as $term){
       		$root_url = get_bloginfo('url');
       		$term_taxonomy=$term->taxonomy;
       		$term_slug=$term->slug;
       		$term_name =$term->name;
       		$link = $term_slug;
       		$output .="<option value='".$link."'>".$term_name."</option>";
       	}
       	$output .="</select>";
       return $output;
       }
       ?>
       <form action="<?php bloginfo('url'); ?>" method="get">
       <?php
       $taxonomies = array('area');
       $args = array('orderby'=>'name','hide_empty'=>false);
       $select = get_terms_dropdown($taxonomies, $args);
       echo $select;
       ?>
       <input type="submit" value="View" />
       </form>
       ```
   
 * Works fine but when I add a variable to the link:
    `$link = $term_slug.'/?id=
   map';` it adds it fine to the html output but on submit alters the url from :
 * mysite.com/area/north-central/
 * to
 * mysite.com/?area=south-central%2F%3Fid%3Dmap
 * Which throws up a 404.
 * Any pointers please?

The topic ‘url string changes’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [formica](https://wordpress.org/support/users/formica/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/url-string-changes/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
