Can duplicate array elements be removed from the tag list?
-
Hello
I would like to remove duplicate array elements from the tag list. I’m having to accomplish this using the_tags() or get_tag_list() because the tag links could not be retrieved by the combination of get_the_tags() and get_tag_link($tag->ID) or get_tag_link($tag->term_ID).
I know of the generic PHP function, array_unique(), that can be used to remove array duplicates. However, the function cannot be used to remove the duplicates retrieved by the_tags() or get_tag_list().
Please someone advise me how to remove duplicates from the_tags() or get_tag_list() or else how to retrieve tag links properly so I can use get_the_tags() and array_unique() to customize the tag list manually to the same end.
Thank you in advance.
Ead
- The topic ‘Can duplicate array elements be removed from the tag list?’ is closed to new replies.