Problems with Tags order on WordPress 4.4
-
Hi everyone ??
Yesterday I update my WP version to 4.4 and I found strange bug, now Tags use with function the_tags are not sorted alphabetically but in order of addition.
To fix this I change some code in single.php:
<?php the_tags('<p class="post-tags"><span>'.__('Tags:','hueman').'</span> ','','</p>'); ?>
to
<?php $tags = wp_get_post_tags($post->ID); $html = '<p class="post-tags"><span>'.__('Tags:','hueman').'</span> '; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); $html .= "<a href='{$tag_link}' rel='tag'>"; $html .= "{$tag->name}</a>"; } $html .= '</p>'; echo $html; ?>
I don’t know whether it’s a bug or WP team decided to change this, but maybe somebody have better solution to sort tags in posts? Maybe some code in funtions.php? ??
Greetings,
Adrian
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problems with Tags order on WordPress 4.4’ is closed to new replies.