Support » Plugin: Simple User Listing » include / exclude

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author helgatheviking


    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.


    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


    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.

    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


    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.