Title: Using query_posts with Custom Post Types &amp; User Access Manager
Last modified: September 1, 2016

---

# Using query_posts with Custom Post Types & User Access Manager

 *  [plinth](https://wordpress.org/support/users/plinth/)
 * (@plinth)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/using-query_posts-with-custom-post-types-user-access-manager/)
 * I’m having trouble displaying custom post types with UAM. If I use following:
 * `query_posts( array( 'post_type' => 'prospectus', 'orderby' => 'meta_value', '
   order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'publish' ) );`
 * then I can see all custom post types from the ‘Prospectus’ type. However, I see
   posts regardless of their UAM status. Let’s say I have a UAM group called “Special
   Access”, and when someone from that group is logged in, they see posts added 
   to that group.
 * I imagine it looking something like this:
 * `query_posts( array( 'post_type' => 'prospectus', 'orderby' => 'meta_value', '
   order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'publish', 'meta_query'
   => array('meta_key' => 'user-access-manager-group', 'meta_value' => 'Special 
   Access') ) );`
 * but of course that doesn’t work.
 * [https://wordpress.org/plugins/user-access-manager/](https://wordpress.org/plugins/user-access-manager/)

The topic ‘Using query_posts with Custom Post Types & User Access Manager’ is closed
to new replies.

 * ![](https://ps.w.org/user-access-manager/assets/icon.svg?rev=1563783)
 * [User Access Manager](https://wordpress.org/plugins/user-access-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-access-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/user-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-access-manager/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [plinth](https://wordpress.org/support/users/plinth/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/using-query_posts-with-custom-post-types-user-access-manager/)
 * Status: not resolved