I would like to know if it is possible to make the tags of posts to appear by the order they were typed.
If it is possible, I would really appreciated to show me the details.
Many Thanks.
Mario
1 Answer
To display post tags in order they were entered into WordPress, use this within the loop (returns a list of tag links):
echo '<ul>';
$tag_list = wp_get_post_terms(get_the_ID(), 'post_tag', array('orderby' => 'term_id', 'fields' => 'all'));
foreach($tag_list as $tag) {
echo '<li><a href="' . get_term_link( $tag ) . '">' . esc_html( $tag->name ) . '</a></li>';
}
echo '</ul>';