Query posts by category and tag_id

I have a query which looks like this:

    <?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.

Read More

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?

Related posts

1 comment

Comments are closed.