Team – Sort by Last Name

0
Team - Sort by Last Name 1
Lorenz
Dec 14, 2016 01:39 AM 1 Answers General
Member Since Oct 2016
Subscribed Subscribe Not subscribe
Flag(0)

Hi,

On my site, I have a lot of team members. I would like to sort them alphabetically by last name. Currently, they are only sorted by first name, see http://www.lorenz-loesch.at/av/academy/meisterkurse/

Is there any way to achieve this?

Best,

Lorenz

2 Subscribers
Team - Sort by Last Name 1
Team - Sort by Last Name 3
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Team - Sort by Last Name 4
PickPlugins
Dec 14, 2016
Flag(0)

Welcome to our forum.

Have you added the custom fields for "First name" & "last Name" ?

you will need to customize the query orderby "meta_value" ,

Please see the codes,

https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

You can see the query team member on following file

team\templates\query.php

 

Regards

Team - Sort by Last Name 5
PickPlugins
- Mar 20, 2017 11:57 PM
Flag (0)
0

Hi @David
Can you please post new support question about your issue.

Regards

Team - Sort by Last Name 6
David
- Mar 20, 2017 11:26 PM
Flag (0)
0

Hi! I need to do the same thing but haven't figured it out. Do I need to add an elseif section to query.php where 'orderby' = 'last_name'? By "changing the plugin slug name" do you mean in the root team.php? Is this different and better than using a team_grid_filter_meta_extra hook? Thanks for your help!

Team - Sort by Last Name 5
PickPlugins
- Dec 14, 2016 12:56 PM
Flag (0)
0

Please don't forget to change the plugin slug name (team > team-custom ) so that it will not overwrite mistakenly future update.

Regards

2+ more comments. Sign in to Reply
Replying as Submit