I have list of terms which happens to be the Polish Alphabet.
Here’s how I list these terms:
<ul>
<?php
$terms = get_terms("taxonomy", array('orderby' => 'title', 'hide_empty' => 0));
foreach ( $terms as $term ) {
echo "<li><a href='". get_term_link( $term->slug, $term->taxonomy ) ."'>" . $term->name . "</a></li>";
} ?>
Everything works like a charm excepting one thing – the letter that is supposed to be after “L” (“Å”) is always the last element o that list (so it’s after “Å»”, not “L”). Is there any way to fix it? I’ve been trying multiple WP versions including Polish builds.
Any ideas? I can always do two foreach loops for A-L and M-Å» and add that one between them, but would love to do that with more class.
You need to set the database collation to
utf8_polish_ci
in yourwp-config.php
to get correct sorting.