Title: parameter and taxonomy problem
Last modified: August 21, 2016

---

# parameter and taxonomy problem

 *  [iperez_genius](https://wordpress.org/support/users/iperez_genius/)
 * (@iperez_genius)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/parameter-and-taxonomy-problem/)
 * I have an issue.
 * I am have created page that will list all the posts of a certain type.
 * [http://betawww5.pyramidanalytics.com/resources](http://betawww5.pyramidanalytics.com/resources)
   
   I am trying to add filtering based on taxonomy
 * [http://betawww5.pyramidanalytics.com/resources?types=video](http://betawww5.pyramidanalytics.com/resources?types=video)
   
   This also works.
 * What is wierd is when i put a term that doesn’t exist
    [http://betawww5.pyramidanalytics.com/resources?types=vi](http://betawww5.pyramidanalytics.com/resources?types=vi)
 * The website redirects me to a 404 pages.
 * I have added a 2 checks to the page.
    1. Only include in the query the parameter
   if its set 2. Only include in the query the parameter if its a taxonomy/
 *     ```
       if(isset($_GET['types']) && is_term($_GET['types'] , 'types' ))
       {
       echo "ilanb".$_GET['types'];
       	$args = array(
       				'post_type' => 'resource_page',
       				'types' => $_GET['types']
       				);
       }else{
       				$args = array(
       				'post_type' => 'resource_page'
   
       				);
       				}
       ```
   

Viewing 1 replies (of 1 total)

 *  [Jack Reichert](https://wordpress.org/support/users/jackreichert/)
 * (@jackreichert)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/parameter-and-taxonomy-problem/#post-4522057)
 * Have you made sure that the [query_var ‘types’ is set in a filter](http://codex.wordpress.org/Function_Reference/get_query_var#Custom_Query_Vars)?
 * You also might want to do this in your theme’s functions.php so that you can 
   use a the action [init](http://codex.wordpress.org/Plugin_API/Action_Reference/init).
   The ‘init’ action fires before the headers are sent. This way you can hijack 
   the page before it is redirected.

Viewing 1 replies (of 1 total)

The topic ‘parameter and taxonomy problem’ is closed to new replies.

## Tags

 * [custom post](https://wordpress.org/support/topic-tag/custom-post/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jack Reichert](https://wordpress.org/support/users/jackreichert/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/parameter-and-taxonomy-problem/#post-4522057)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
