Query posts by category and tag_id

admin

Administrator
Staff member
I have a query which looks like this:

Code:
    <?php
    $args = array( 
      'post_type'=> 'user',
       'showposts'=> -1

       );

        $users = new WP_Query($args);

        echo '<pre>' .print_r($users->posts, 1). '</pre>';

        ?>

The query returns all posts that exist. I now want to add a filter to search by category. Be aware this is custom post type and the categories was a taxonomy.

When i hover over the categories in wordpress it shows the related id's. However when i try to filter by that id, it does not work :(

Any ideas?