preload preload preload preload preload preload preload

register → | login →

Abstract

BS_List_Taxonomies is the quickest, most effective way to display the options of your custom taxonomies, displaying the options in a list identical to the one generated by WP_List_Pages. Not only does it work quickly and easily, it also works with your existing stylesheets ASAP.

Options

$taxonomy: Required. String. This is the name of the taxonomy you want to list. (Future support: ID)

$args: title_li: Optional. String. Default is the taxonomy name.

echo: Optional. Boolean. Default is True.

link_before: Optional. String. Text before the link

link_after: Optional. String. Text after the link

tack_on: Optional. Boolean. Use this if you want to add a ‘filtering’ feature, it will tack on the data after the current URL. Taxonomy rewrite must be false for this to work.

no_value: Optional. String. Define as null if you do not want, this is a value that, when clicked, removes the taxonomy filter from the URL

no_value_link: Optional. String. Link that no_value takes you back to if there are no more taxonomy filters.

Example

Try this:

<?php BS_List_Taxonomies(‘Sizes’,'title_li=Choose One&link_before=”&raquo;”&no_value=No Preference’); ?>

This will show this:

Choose One

> SizeA

> SizeB

> SizeC

Warnings

Though powerful, BLT is not perfect, and is still in version 0.9.

  • Your taxonomies must not be hierarchichal
  • Your taxonomies must not be “URL rewritten”
  • BLT only works on custom taxonomies and not tag

If you experience any problems, email me (my email is in the download, under the @author tag of the namespace.)

Powered by WordPress