Support » Fixing WordPress » 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');

    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?


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