• Hello,

    I am looking to display all tags in select form that are from posts that have been assigned to a specific category.

    I am using the following code to generate every tag in a select form.

    <div>
      <?php
      echo "<select onChange=\"document.location.href=this.options[this.selectedIndex].value;\">";
    	echo "<option>By product</option>\n";
    	foreach (get_tags() as $tag)
    	{
    	  echo "<option value=\"";
    	  echo get_tag_link($tag->term_id);
    	  echo "\">".$tag->name."</option>\n";
    	}
              echo "</select>"; ?>
    </div>

    Can someone point me in the direction on how I can just display the tags that are from all posts assigned to the videos category?

    Any help much appreciated

Viewing 1 replies (of 1 total)
  • Thread Starter rikardo85

    (@rikardo85)

    The above code generates a list of all tags.

    I would like to display only tags that are from posts assigned to a specific category.

Viewing 1 replies (of 1 total)
  • The topic ‘Display tags from specific category in select form’ is closed to new replies.