It displays the links in the sidebar as a simple dropdown list (select box). If you have more link categories, every one will be shown in it’s own list.
This is supposed to replace the original get_links_list() function and should be useful if you have a lot of links, but you don’t want to clutter up your sidebar with them!
- Download the zip file containing the plugin. There are two versions, both with equal functionality, to choose depending on the WordPress version you are using:
Zelig Dropdown Links 1.2 – For WP 2.1 (and following, I hope…);
Zelig Dropdown Links 1.1 – For previous WP versions.
- Extract the zelig-dropdown-links.php file into the plugins directory in your WordPress installation (wp-content/plugins).
- Log in to WordPress administration. Go to the Plugins page and Activate this plugin.
- Put this code somewere in your template page, outside the loop (usually in sidebar):
<?php zelig_dropdown_links(); ?>
The zelig_dropdown_links() function has some parameters you can pass (please note that options syntax is changed from version 1.0):
|boxwidth||number||width size (in pixel) of the list box. If you don’t use this parameter or if you set it to 0, the list box will assume the width of the longest category name it contains. If you set a width value, longer names may be truncated at that point, depending on browser (IE6…)||0|
|exclude||number or comma separated list of numbers||link category or categories (ID numbers) to hide. If not set or set to 0, all link categories will be displayed.||0|
|include||number or comma separated list of numbers||link category or categories (ID numbers) to display. If not set or set to 0, all link categories will be displayed.||0|
|set to 0 if you don’t want the first row of the list as a title with the name of the link category (text appearing in the list box when it’s closed).||1|
<?php zelig_dropdown_links('boxwidth=120'); ?>
Set the width of the list to 120 pixels.
<?php zelig_dropdown_links('boxwidth=120&exclude=1'); ?>
Set the width of the list to 120 pixels and hide link category with ID 1.
<?php zelig_dropdown_links('boxwidth=120&exclude=1,2,3'); ?>
Set the width of the list to 120 pixels and hide link categories with ID 1, 2 and 3.
<?php zelig_dropdown_links('include=1&title=0'); ?>
Displays only link category with ID 1 and without the category name as a list “title”.
This plugin, due to the peculiarity of the type of visualization, ignores a lot of elements of WordPress links, like image, description, score, target and rel. Only URI, name, visibility, sorting type and category limit are used.
You can use more than one istance of the function in the same page (provided that not showing the same links).
The output code is valid XHTML Strict.
Tested with WordPress from 2.0.4 to 2.1 only.
- Version 1.2 (february 16, 2007): WordPress 2.1 compatibile.
- Version 1.1 (january 17, 2007): added “exclude”, “include” and “title” options.