Title: Error when using post_type
Last modified: August 20, 2016

---

# Error when using post_type

 *  [cechise](https://wordpress.org/support/users/cechise/)
 * (@cechise)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/error-when-using-post_type/)
 * Hi
 * Not sure that i’m posting in the correct area right now.
 * I do however have a problem when using the post_type parameter in both wp_list_pages
   and get_pages.
 * I have a custom post type set up and i want to list both ‘page’ and ‘my_post_type’.
   From what i can understand it’s not possible to send multiple values in the post_type
   parameter. So instead i try using the value ‘any’. But that fails aswell.
 * Simply put, this:
 *     ```
       $params = array('post_type'=>'any');
       var_dump(get_pages($params));
       ```
   
 * Returns **false** and gives a:
 * > ( ! ) Notice: Only variable references should be returned by reference in C:\
   > wamp\www\wp-includes\post.php on line 3394
 * While changing the post_type to ‘page’ works.
 * Is this a bug or is it intended? And how do i list both my custom post types 
   and the pages hierarchically?
 * Thanks

The topic ‘Error when using post_type’ is closed to new replies.

## Tags

 * [get_pages](https://wordpress.org/support/topic-tag/get_pages/)
 * [post_type](https://wordpress.org/support/topic-tag/post_type/)
 * [wp_list_pages](https://wordpress.org/support/topic-tag/wp_list_pages/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [cechise](https://wordpress.org/support/users/cechise/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/error-when-using-post_type/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
