Search by tags in the form of a drop-down list

By DavidMonk on Apr 20, 2021

The task is to display a drop-down list of all tags and add a link obtained using get_tag_link () to each displayed tag;

<?php wp_dropdown_categories($args = array(
  'show_option_all'    => 'Search by topic',
  'taxonomy'    => 'post_tag',
));?>

I display the list using the code specified above, then, as I understand it, I need to write a loop where a value attribute with a link will be added to each element, but I don’t quite understand how to implement this, or is there some other option?

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.