Skip to:
Content
Pages
Categories
Search
Top
Bottom

Order users by xProfile field value in WP backend


  • LavishDhand
    Participant

    @lavishdhand

    Hi!

    I am adding Member Types to my site. I have over 4000 members and want to bulk assign member types to existing members.

    The problem is; I have to assign different member types to male and female members. Male / Female is a BuddyPress xProfile field value. Is there any way to order /sort users in the back-end by an xProfile field value?

    sort users by

    If not, is there any other work around? I am using latest WordPress, BuddyPress and BP Member Type Generator Plugin.

    Thank you for the help

Viewing 1 replies (of 1 total)

  • Paul Gibbs
    Keymaster

    @djpaul

    Anything’s possible, but the reason it’s not by done by default in the UI is that the field value in the database is a LONGTEXT field and is not indexed. This means a slow DB query if we wrote one, and a site of your scale, you’d notice the (lack of) performance.

    It sounds like you’re trying to set member type in bulk, and you were hoping to use the ordering here to let you bulk-select to speed it up. I’d write a utility function to do this, or a WP-CLI command.

    If I gave you a start, do you know how to write PHP (well enough) to test and debug it?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar