Title: Cannot get a query string parameter
Last modified: August 21, 2016

---

# Cannot get a query string parameter

 *  [Mads Phikamphon](https://wordpress.org/support/users/madsphi/)
 * (@madsphi)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-get-a-query-string-parameter/)
 * Hi,
 * We are using Woocommerce to display our products.
 * When customers filter our products, they can end up with a query string like 
   this:
    [http://www.burgerbar.dk/shop/?filter_farve-type=103&filter_land=51](http://www.burgerbar.dk/shop/?filter_farve-type=103&filter_land=51)
 * In our code, we have no problems accessing the land parameter like this:
    $land
   = $_GET[filter_land];
 * But we can’t access the farve/type parameter, despite calling it in the same 
   way:
    $farvetype = $_GET[filter_farve-type];
 * I have some idea that the problem is the “-“, but if I remove it from the attribute
   slug, we end up creating a lot of other problems (i.e. I will prefer to not have
   to remove it)
 * So can anyone tell me how to fix things, so we can access the farve/type parameter
   without changing the attribute slug?
 * Thanks,
    Mads

The topic ‘Cannot get a query string parameter’ is closed to new replies.

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [get](https://wordpress.org/support/topic-tag/get/)
 * [Query String](https://wordpress.org/support/topic-tag/query-string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Mads Phikamphon](https://wordpress.org/support/users/madsphi/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/cannot-get-a-query-string-parameter/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
