Skip to content

orderby several fields #42

Description

@ejvindh

Hi. Thanks for this awsome plugin.

I'm looking for ways to order the list by several fields. The usecase is that I want a list ordered by names. I have of course found the instruction about how to order by lastname:
[userlist meta_key="last_name" orderby="meta_value" order="ASC"]

But then sometimes my users have identical lastnames, and I want then to order by first_name.

I've tried several combinations, such as:
[userlist meta_key="last_name, first_name" orderby="meta_value" order="ASC"]
(result: nothing found)

[userlist meta_key="last_name" orderby="meta_value, first_name" order="ASC"]
(result: no difference from the suggested solution)

[userlist orderby="last_name, first_name" order="ASC"]
(result: No sorting at all)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions