Forums

WP-PageNavi
[resolved] Fatal error: Call to undefined method WP_User_Query::get() (3 posts)

  1. Scott Cariss
    Member
    Posted 6 months ago #

    I've upgraded from Version 2.75-alpha2 to Version 2.81 and since doing that WP-PageNavi now fails with this error:

    Fatal error: Call to undefined method WP_User_Query::get() in xxxxx/xxxxx/xxxxx/wp-pagenavi/core.php on line 207

    This is my template file where I'm getting the error:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. scribu
    Member
    Posted 6 months ago #

    $wp_query = new WP_User_Query($args);

    You shouldn't replace $wp_query with a WP_User_Query instance. Use $user_query instead.

    For WP PageNavi to work with users, you can do this:

    wp_pagenavi( array(
      'query' => $user_query,
      'type' => 'users'
    ) );
  3. Scott Cariss
    Member
    Posted 6 months ago #

    Thanks scribu for the prompt reply.

    Made the amends and this now functionally correctly.

    Many Thanks

Reply

You must log in to post.

About this Plugin

About this Topic