I am trying to display artists in alphabetical order. They kind of do bu then some letters are added to the end. You can see list by going here and rolling over artists in the menu (E, F, O and T appear at the end):
You need to format your code correctly for the HTML to show up.
You can highlight your code, then use the </> button in the editor window, which will format it.
Or you can place three backticks ``` (top left key on US/UK keyboards) on a line before your code, and three on a line after your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.
Thank you everyone for the help. I discovered the code was using a second function which was organising the categories by ID rather than by slug. All fixed now.