Title: include / exclude
Last modified: August 21, 2016

---

# include / exclude

 *  Resolved [fencer019](https://wordpress.org/support/users/fencer019/)
 * (@fencer019)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/include-exclude/)
 * Is it possible to add a parameter to include or exclude certain users?
 * [http://wordpress.org/plugins/simple-user-listing/](http://wordpress.org/plugins/simple-user-listing/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071107)
 * In the shortcode? At this moment, no. But you can always filter either `sul_user_query_args`
   or `pre_user_query`. I will consider adding support for the `WP_User_Query` parameters…
   it shouldn’t be overly hard.
 *  [creamille](https://wordpress.org/support/users/creamille/)
 * (@creamille)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071378)
 * Hi!
 * Since I’m not a web developper, I don’t really know if it’s correct, but it worked
   for me.
 * I had a list of registered users (mainly contributors, but also 3 admins including
   me) and I didn’t want to appear in this list. So the only solution for me was
   to only exclude my profile (ID), not a type of users.
 * In the **simple-user-listing.php** l.137, I added :
 * `'exclude' => array( 1 ),`
 *     ```
       $args = array(
       				'query_id' => 'simple_user_listing',
       				'exclude' => array( 1 ),
       				'offset' => $offset,
       				'number' => $number,
       				'orderby' => $orderby,
       				'order' => $order,
       				'role' => $role
       			);
       ```
   
 * I was the first user registered (“1”) but you could easily replace this ID by
   finding yours in your SQL file.
    It seems to work pretty well, so maybe it could
   help…
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071380)
 * Please don’t hard-code something like that in the plugin source, you’ll lose 
   your changes as soon as you upgrade.
 *     ```
       [userlist exclude="1"]
       ```
   
 * will work in the next update… which I will try to push out in a few days.
 *  [creamille](https://wordpress.org/support/users/creamille/)
 * (@creamille)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071381)
 * Ok, my bad! I need this feature to work now, so I leave it like this for now 
   and when the next update is available, I will use this shortcode. Thanks for 
   your prompt answer 🙂
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071382)
 * I just pushed it live, so check for updates in your dashboard.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘include / exclude’ is closed to new replies.

 * ![](https://ps.w.org/simple-user-listing/assets/icon-256x256.png?rev=3061308)
 * [Simple User Listing](https://wordpress.org/plugins/simple-user-listing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-user-listing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-user-listing/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-user-listing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-user-listing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-user-listing/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/include-exclude/#post-4071382)
 * Status: resolved