And those players don’t show up in player lists as well
Hi Bart!
Thanks for reaching out and I’m sorry for the trouble.
What do you see when you check the player edit screen? Do you see multiple teams for your players?
Thanks!
Hi Roch
the edit screen only shows one team
View post on imgur.com
Hi Bart!
Thanks for your reply.
What happens if you remove that team for that player?
If it removes all the 3 teams, it’s an easier fix (we can even add just a “cosmetic” fix). If it removes just one of them we’ll need to find out where these extra teams are coming from.
Thanks!
when i remove the team, they are all gone.
and when i add the team again, only one team shows up.
https://jongsintgillis.be/player/van-schoor-daan/
Hi Bart!
Thansk for testing!
Then a visual fix should be enough (if that doesn’t affect your data entry).
Please install a plugin that allows you to add data to your footer or header (or use a child theme), then add this code in it:
<script>
jQuery( document ).ready(function() {
var el, txt, n;
el = jQuery(".single-sp_player .sp-player-details dd:nth-child(2)");
txt = el.text();
n = txt.search(",");
if ( n > 0 ) {
txt = txt.substring(0, n);
el.text(txt);
}
});
</script>
Here is a plugin that can do that:
https://wordpress.org/plugins/custom-code/
Thanks!
wil this solve the problem that these players don’t show up in the player list as well?
Hi Bart!
Thanks for your reply.
Unfortunately no, it won’t.
After you removed the team and added it back, do you see that player in the players’ list again?
If yes, then you’ll need to remove the team from all of your players and add it back manually.
It’s likely that there is some corrupt data there, but it’s hard to troubleshoot as I’m unable to reproduce this issue.
Thanks!
is there an easy way to remove the current team from all players? i have about 180 players…
Hi Bart!
We do have the quick edit option:
http://prntscr.com/knhuor
But we don’t have a bulk edit for that, unfortunately.
It’s possible to do that, but you’ll need some custom code, or you could remove these entries from your database directly (this requires some database knowledge but could work for a quick swipe of all current_team custom fields).
Thanks!
BTW, in case you want to go to the phpmyadmin note, you just need to go to the postmeta table, then search for “sp_current_team” as the meta key:
http://prntscr.com/kni140
Then you can click “show all” and delete (after the table).
Thanks!