Forums

[closed] can somebody tell me how to put this in a dropdown menu (9 posts)

  1. thefun1
    Member
    Posted 6 months ago #

    I have this code that gets post by tags from a category and i want it to show them in a dropdown menu and not just a very long list.

    can anybody tell me how to do that?

    here is what i want to show in a dropdown menu

    <?php
    $args = array( 'categories' => '1' ); $tags = get_category_tags($args);
    $content .= "<ul>"; foreach ($tags as $tag) { $content .= "<li><a href=\"$tag->tag_link\">$tag->tag_name</a></li>"; } $content .= "</ul>"; echo $content;
    ?>
  2. vtxyzzy
    Member
    Posted 6 months ago #

    You use the select tag as described here.

  3. thefun1
    Member
    Posted 6 months ago #

    yeah i know that but don't know how...

  4. vtxyzzy
    Member
    Posted 6 months ago #

    There are many tutorials on creating dropdown lists. For example, http://personal-computer-tutor.com/dropdownlist.htm

    Google 'html dropdown list' for more.

  5. timDesain
    Member
    Posted 6 months ago #

    you can use widget to display categories, and check dropdown option.

  6. thefun1
    Member
    Posted 6 months ago #

    NOO a widget will NOT work if you read what i said it gets post by TAG from a category.

    so like if i have a category that is say 'music' and it has tags like bands1, bands2, band3.. the code shows band1 band2 and band3 but not the post inside.

    it shows tags from just category music because i have other categories and only want to show music and not others.

    but what i want is it the code to display in a dropdown list i have tried everything looked at every site and still can not figure it out.

    i thought maybe somebody could show me how to make it show in a dropdown list and not just a long list.....

  7. timDesain
    Member
    Posted 6 months ago #

  8. thefun1
    Member
    Posted 6 months ago #

    nope nope nope nevermind. you people are stupid...

  9. timDesain
    Member
    Posted 6 months ago #

    nice response.
    :)

Topic Closed

This topic has been closed to new replies.

About this Topic