Title: Links Dropdown
Last modified: August 18, 2016

---

# Links Dropdown

 *  [pezastic](https://wordpress.org/support/users/pezastic/)
 * (@pezastic)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/)
 * , I’m trying to create a links dropdown list. I have no idea what I’m doing. (“
   Little children shouldn’t play with guns,” comes to mind.) I wonder why this 
   doesn’t work:
    ` <form name="menuform"> <select name="menu3" style="width:150px;
   margin: 0px; font-family: Tahoma; font-size: 10px;" onChange="window.open(menuform.
   menu3.options[menuform.menu3.selectedIndex].value);return false;"> <option value
   =''>Select Link</option> <?php wp_get_links(); ?> </select> </form>

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68015)
 * Because wp_get_links doesn’t output links in <option> form. You will have to 
   create a new function to do that.
 *  Thread Starter [pezastic](https://wordpress.org/support/users/pezastic/)
 * (@pezastic)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68154)
 * And how do I do that?
 *  [moods](https://wordpress.org/support/users/moods/)
 * (@moods)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68202)
 * Hi,
    I’don’t know if you like the way i used, but see at [http://www.leparole.net/moods](http://www.leparole.net/moods)
   and try to click on the “link” item (and in the others, ade in the same way. 
   If you like the solution, you find the code and the instructions here: [http://www.scriptygoddess.com/archives/2003/01/16/showhide-anything/](http://www.scriptygoddess.com/archives/2003/01/16/showhide-anything/)
   Anyway, cause links in WP are divided in subcategories, the graphic issue wasn’t
   perfect, so I made some modification to the second chunk of code present there.
   So, take the first one from the site of scriptygoddess (the onhe which goes between
   the “head” tags, but for the second, if you like, you can use this: ‘<!–scriptgoddes
   LINKS INIZIO–> <!– …. do not change the line below … –> <? $layernum++; if (!
   isset($jsenabled)) { ?>
    - <span id=”click<? echo $layernum; ?>”>[,’#?jsenabled=no’);return false;”>
      
      <!– … do not change the line above … –> <?php _e(‘(+) Links’); ?> <!– …. do
      not change the line below … –> </span> <? } ?> <!– if users click on the link
      and it doesn’t work – the page will be refreshed with the block below showing–
      > <!– Below is layer that is shown when open –> <div id=”hide<? echo $layernum;?
      >” <? if (!isset($jsenabled)) { ?> style=”display: none” <? } ?>> <!– … do
      not change above (can customize the line below) … –> [,0);return false;”> (-)
      Links  <!–questa ï¿½ la lista dei links–> <ul style=”font-size: 140%;”><BR
      > <?php get_links_list(); ?>
    -  <!– you can also copy this block (look for the next ******) and duplicate
      it ABOVE the text you’re hiding… that way people don’t have to scroll to “
      close” the block –>
       <!– ******* if duplicating copy to here and copy and 
      paste above the text you’re hiding to allow for another link to close the 
      block –> </div>
    - <!– … do not change the lines above … –>
       <!–<LI style=”font-family:georgia,
      times, serif; font-weight:bold;”>–> <!–scriptgoddes LINKS FINE–>’
 *  [moods](https://wordpress.org/support/users/moods/)
 * (@moods)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68203)
 * oops, i don’t know how to render code in this forum…. the one above is not correct(
   and sorry to all the users).
    If anyone explain me how to post it 🙂 i’d be glad
   to share with you Simone (Italy)
 *  [moods](https://wordpress.org/support/users/moods/)
 * (@moods)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68204)
 * I try again…..
    <!–scriptgoddes LINKS INIZIO–> <!– …. do not change the line 
   below … –> <? $layernum++; if (!isset($jsenabled)) { ?>
    - <span id=”click<? echo $layernum; ?>”>[,’#?jsenabled=no’);return false;”>
      
      <!– … do not change the line above … –> <?php _e(‘(+) Links’); ?> <!– …. do
      not change the line below … –> </span> <? } ?> <!– if users click on the link
      and it doesn’t work – the page will be refreshed with the block below showing–
      > <!– Below is layer that is shown when open –> <div id=”hide<? echo $layernum;?
      >” <? if (!isset($jsenabled)) { ?> style=”display: none” <? } ?>> <!– … do
      not change above (can customize the line below) … –> [,0);return false;”> (-)
      Links  <!–questa ï¿½ la lista dei links–> <ul style=”font-size: 140%;”><BR
      > <?php get_links_list(); ?>
    -  <!– you can also copy this block (look for the next ******) and duplicate
      it ABOVE the text you’re hiding… that way people don’t have to scroll to “
      close” the block –>
       <!– ******* if duplicating copy to here and copy and 
      paste above the text you’re hiding to allow for another link to close the 
      block –> </div>
    - <!– … do not change the lines above … –>
       <!–scriptgoddes LINKS FINE–>
 *  [Silver](https://wordpress.org/support/users/silver/)
 * (@silver)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68304)
 * I actually created a plugin to use get_links( ) in a drop down menu. I can’t 
   recall if I used the same parameters as the original get_links( ). I may have
   taken out some of the parameters that I didn’t want to use for my plugin.
    Right
   now, the plugin can organize links by Category ID. You may also choose the order
   by which the links are organized (name, ID, URL, Description and random). You
   may also limit the number of links shown in the dropdown menu. I am using the
   plugin to organize two different categories of links (“Favorite Sites” and “WP
   Plugins – Thank you”) on my site. I don’t know if this is what you’re looking
   for but you are welcome to check out the plugin: [http://typedby.com/archives/2004/06/14/drop-down-plugin-for-wp-links-manager/](http://typedby.com/archives/2004/06/14/drop-down-plugin-for-wp-links-manager/)
 *  [peoriapundit](https://wordpress.org/support/users/peoriapundit/)
 * (@peoriapundit)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68604)
 * Any thought given to figuring out how to create seperate drop down for each link
   category, or at least in how to create subheads within the drop down list?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Links Dropdown’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 5 participants
 * Last reply from: [peoriapundit](https://wordpress.org/support/users/peoriapundit/)
 * Last activity: [20 years, 9 months ago](https://wordpress.org/support/topic/links-dropdown/#post-68604)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
