Ein kleines, aber lästiges Detail der Funktion get_the_terms(): Die zurückgegebenen Terms werden nicht alphabetisch sortiert, so wie man es sich erwarten würde.
Die Lösung: Selbst sortieren.
Hier ein Beispiel aus einer functions.php:
$terms = get_the_terms($post->ID, 'besonderheiten'); foreach ( $terms as $term ) { $besonderheiten[$term->slug] = $term; } ksort($besonderheiten); if (! empty($besonderheiten) ) { echo '<h2 id="bhintro">Besonderheiten</h2><span class="icondata">'; foreach ( $besonderheiten as $besonderheit ) { echo '<img src="http://www.ostheimer.at/angelkarten/wp-content/uploads/2014/08/' . $besonderheit->slug . '.png" title="Besonderheit ' . $besonderheit->name . '" alt="Besonderheit ' . $besonderheit->name . '" /> ' . $besonderheit->name . '<br />'; } echo '</span>'; }
Zuerst werden die Terms in $terms gespeichert, danach sortieren wir die enthaltenen Daten nach dem slug was in meinem Fall Sinn macht. Eine Sortierung nach name ist auch oft erforderlich. Die Sortierung übernimmt die PHP-Funktion ksort, welche ein vorher angelegtes Array nach name sortiert und damit die zweite foreach-Schleife mit sortierten Daten versorgt.
pharmacy website india https://indiaph24.store/# reputable indian online pharmacy
indian pharmacy
buying prescription drugs in mexico online: mexico pharmacy – mexico drug stores pharmacies
http://indiaph24.store/# top online pharmacy india
indian pharmacy paypal http://indiaph24.store/# indian pharmacy
indian pharmacy online
tamoxifen vs clomid: tamoxifen moa – tamoxifen bone pain
https://finasteride.store/# cost propecia without rx
http://finasteride.store/# buying cheap propecia without a prescription
nolvadex for pct [url=http://nolvadex.life/#]tamoxifen effectiveness[/url] tamoxifen medication
http://lisinopril.network/# zestril 5mg
buy cytotec online [url=http://cytotec.club/#]Cytotec 200mcg price[/url] buy cytotec online
http://cytotec.club/# buy cytotec over the counter
buying cheap propecia without dr prescription: cost of generic propecia online – cost of cheap propecia
http://cytotec.club/# buy cytotec in usa
https://finasteride.store/# cost of propecia pill
https://lisinopril.network/# buy lisinopril 20 mg online united states
buy ciprofloxacin tablets [url=https://ciprofloxacin.tech/#]buy cipro[/url] buy ciprofloxacin tablets
tamoxifen estrogen: nolvadex pct – how to prevent hair loss while on tamoxifen
https://finasteride.store/# cost cheap propecia pill
zestoretic 5 mg: zestril 2.5 – zestril tablet
https://cytotec.club/# Cytotec 200mcg price
https://ciprofloxacin.tech/# antibiotics cipro
buy misoprostol over the counter: Cytotec 200mcg price – buy cytotec online fast delivery
http://lisinopril.network/# zestril 10 mg cost
tamoxifen: tamoxifen cancer – tamoxifen
https://finasteride.store/# buying propecia pill
https://finasteride.store/# home
Abortion pills online: buy cytotec in usa – purchase cytotec
https://lisinopril.network/# zestril 2.5
nolvadex vs clomid [url=http://nolvadex.life/#]tamoxifen vs clomid[/url] tamoxifen skin changes
http://finasteride.store/# generic propecia pill
cost propecia no prescription: buy propecia without dr prescription – cost of cheap propecia pill
http://finasteride.store/# cost generic propecia for sale
https://cytotec.club/# cytotec online
buy cytotec pills online cheap: order cytotec online – buy cytotec
https://finasteride.store/# get propecia price