{"action":"created","issue":{"url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/47","repository_url":"https://api.github.com/repos/lesterchan/wp-pagenavi","labels_url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/47/comments","events_url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/47/events","html_url":"https://github.com/lesterchan/wp-pagenavi/issues/47","id":176405397,"number":47,"title":"How to get pagination to work with a WP_User_Query","user":{"login":"yoxalld","id":1072778,"avatar_url":"https://avatars.githubusercontent.com/u/1072778?v=3","gravatar_id":"","url":"https://api.github.com/users/yoxalld","html_url":"https://github.com/yoxalld","followers_url":"https://api.github.com/users/yoxalld/followers","following_url":"https://api.github.com/users/yoxalld/following{/other_user}","gists_url":"https://api.github.com/users/yoxalld/gists{/gist_id}","starred_url":"https://api.github.com/users/yoxalld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoxalld/subscriptions","organizations_url":"https://api.github.com/users/yoxalld/orgs","repos_url":"https://api.github.com/users/yoxalld/repos","events_url":"https://api.github.com/users/yoxalld/events{/privacy}","received_events_url":"https://api.github.com/users/yoxalld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-12T15:25:11Z","updated_at":"2016-09-12T16:13:24Z","closed_at":null,"body":"I am having an issue getting the pagination to work while using the WP_User_Query. Here is what I have that doesn't seem to be working. A couple things to note: I am using this as a custom loop on a page template. You will notice I have tried both the 'page' and 'paged' vars. Neither of them seem to work. I've got pagination working with the standard posts loop as well as with a custom post type elsewhere on this site so I know the plugin works and things are good there. Any help you can provide me would be greatly appreciated. Thanks!\r\n``` \r\n$user_fields = array( 'ID', 'display_name', 'user_email' );\r\n\t//$paged = ( get_query_var('page') ) ? get_query_var('page') : 1;\r\n\t$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;\r\n\t$args = array(\r\n\t\t'number' => '1',\r\n\t\t'role__in' => array('Subcriber', 'Editor'),\r\n\t\t'fields' => $user_fields,\r\n\t\t'paged' => $paged\r\n\t); // End Args\r\n}\r\nif ($args){\r\n\t$user_query = new WP_User_Query( $args );\r\n}\r\n if ( ! empty( $user_query->results ) ) :\r\n\t foreach ( $user_query->results as $user ) :\r\n\t\t//Display stuff\r\n\t endforeach;\r\n\twp_pagenavi( array( 'query' => $user_query ) ); \r\nendif\r\n```"},"comment":{"url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/comments/246400309","html_url":"https://github.com/lesterchan/wp-pagenavi/issues/47#issuecomment-246400309","issue_url":"https://api.github.com/repos/lesterchan/wp-pagenavi/issues/47","id":246400309,"user":{"login":"lesterchan","id":355829,"avatar_url":"https://avatars.githubusercontent.com/u/355829?v=3","gravatar_id":"","url":"https://api.github.com/users/lesterchan","html_url":"https://github.com/lesterchan","followers_url":"https://api.github.com/users/lesterchan/followers","following_url":"https://api.github.com/users/lesterchan/following{/other_user}","gists_url":"https://api.github.com/users/lesterchan/gists{/gist_id}","starred_url":"https://api.github.com/users/lesterchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesterchan/subscriptions","organizations_url":"https://api.github.com/users/lesterchan/orgs","repos_url":"https://api.github.com/users/lesterchan/repos","events_url":"https://api.github.com/users/lesterchan/events{/privacy}","received_events_url":"https://api.github.com/users/lesterchan/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T16:13:24Z","updated_at":"2016-09-12T16:13:24Z","body":"This plugin is not meant to work with User Query. It is meant for Post only"}}
{"actor":{"display_login":"lesterchan"}}