Plugin Contributor
Savvas
(@savvasha)
Hi there @lentini84 ,
The link to your screenshot is not working for some reason. Can you try a different service like snipboard.io ?
Thanks,
Savvas
https://snipboard.io/9cG8g1.jpg
Plugin Contributor
Savvas
(@savvasha)
What setting do you have at SportsPress->Settings->Events->Players
? https://snipboard.io/UFLVcI.jpg
Thanks,
Savvas
yes, yes – I set it here to NAME, because I saw that someone asked for something similar and you prompted him this way. But for me, no matter which option I choose – no effect. It keeps sorting by ID, not last name…
Plugin Contributor
Savvas
(@savvasha)
You are right. Please try to add the following code at your childs theme function.php file:
function wp123_players_selector_args( $args ) {
$args['orderby'] = 'name';
$args['order'] = 'ASC';
return $args;
}
add_filter( 'sportspress_players_selector_args', 'wp123_players_selector_args' );
hmm
i have error “syntax error, unexpected ‘return’ (T_RETURN)”. This applies to: return $args;
Plugin Contributor
Savvas
(@savvasha)
Check that you didnt forget any bracket {
or }
The above code is working just fine in my test environment.
https://snipboard.io/lXPY1k.jpg
Plugin Contributor
Savvas
(@savvasha)
On line 192 and 193 you are having some “strange” characters [
instead of [
that’s weird, i copied exactly what you sent me. But actually – I fixed it and it works! Thank you very much!
Can I have one more question but related to the table? I mean, is it possible to mark places in each table SEPARATELY in each table? Because at this point I added in the code to highlight places 1-4 in gray. But I would like to add a highlight for each table SEPARATELY! So that in GROUP A it would highlight, for example, places 1-2, and in group B places 1-3. Is it possible?
https://snipboard.io/azqOyQ.jpg
Plugin Contributor
Savvas
(@savvasha)
Please open a new topic for the highlight issue. It will be easier for users with similar questions to seek for support.
I am marking this one as resolved 🙂
Thanks,
Savvas