An array of tags id was obtained from which you need to make a list of working links, in which the URL will be a link to the tag and the anchor will be the name of the tag.

This is about the array I am getting (in this case, 3 id tags should be returned, but there can be any number from zero):

array (4) {[0] => string (1) "0" [1] => string (2) "35" [2] => string (2) "34" [3] => string (2) "74"}

How to process it to the state of the list of urls?

    1 answer 1

    Iterate over the array, substitute the tag ID into the following structure:

    <a href="<?php echo get_term_link( $term_id, $taxonomy ); ?>">Title</a> 

    get urls on exit

    • It’s not quite clear from your example how to get a list with an arbitrary number of variables (I don’t know how many tags are in the array), and besides, I would also like to get the tag headers so that the anchor is not a “Title”. - Unicom