Readme for Tag List Widget v0.3
Displays tags in a bulleted, numbered, or line-break deliminated list with options to trim tag names, display post counts, and exclude specific tags.
Description
Creates a list of tags as an alternative to the tag cloud. List can be bulleted, numbered, or deliminated by line breaks; custom list formatting is also available. Widget provides options to specify list label and trim long tag names to fit theme constraints, as well as display post counts. Widget can also exclude tags based on tag slugs.
List function can also be called directly for use in non-widget themes using <?php if(function_exists('TLW_direct')) {TLW_direct();} ?>. See FAQ for TLW_direct arguments.
Compatibility
The Tag List Widget is compatible with WordPress 2.3 – 2.9.1.
Installation
- Upload tag-list-widget.php to /wp-content/plugins/.
- Activate plugin through the WordPress Plugins menu.
- Activate widget from the Appearance > Widgets menu in WordPress. (In earlier versions, Widgets are found under the Presentation menu.)
- Set list label and maximum tag length from the widget’s options pane. To exclude tags, enter a comma-separated list of slugs in the space provided. Then select deliminator from options provided.
Frequently Asked Questions
- I entered tags to be excluded, but they are still appearing. What happened?
- The list of tags to exclude should be entered as a comma-separated list with no whitespace between the tag slugs and commas. For example, to exclude the general and uncategorized tags, enter the following:
- general,uncategorized
- The list of tags to exclude should be entered as a comma-separated list with no whitespace between the tag slugs and commas. For example, to exclude the general and uncategorized tags, enter the following:
- I set the deliminator to a bulleted (or numbered) list, but the bullets don’t appear.
- Some themes use CSS to hide the list markers in the sidebar. To counteract this, you must apply custom CSS to the list as described in the following FAQ.
- Can I use CSS to style the list?
- Two CSS IDs are applied to the list generated by this plugin. The first, “taglist”, is applied to the list as a whole. The second, “taglist_item”, applies to the individual list elements.
- For example, if your theme hides the bullets and you would like to display round bullets, add the following CSS to your theme’s stylesheet. This can be done via the Theme Editor found under Appearance > Editor.
- #taglist {list-style-type:disc;}
- If you desire a numbered list but the numerals aren’t showing, add the following CSS to your theme’s style sheet:
- #taglist {list-style-type:decimal;}
- Other list-style-type options include circle, which displays an unfilled circle, and square, which displays a solid-colored square. A Google search on the term “CSS list style” will yield innumerable resources to aid in styling the list that results.
- If my theme does not support widgets, can I still use the plugin?
- If not using a widget-enabled theme, insert the function
<?php if(function_exists('TLW_direct')) {TLW_direct();} ?>where the list should appear. The function has five required arguments; omitting any will generate an error. All arguments should be enclosed in quotes. If a particular argument is not desired, simply insert two quotation marks as demonstrated below. The arguments are: limit, display count, code before item, code after item, and excluded tags.- Limit – the maximum length of a tag that should be displayed. If a tag is truncated, an elipsis (…) will be added to indicate the truncation. Set to “0″ to display full tags.
- Display count – to show number of posts with a particular tag, set this argument to “on”. Otherwise, simply enter two quotation marks in this argument’s place to exclude post counts.
- Code before item – any valid HTML you would like to display before each tag.
- Code after item – any valid HTML you would like to display after each tag.
- Excluded tags – enter a comma-separated list of tags to be excluded from the resulting list.The following example demonstrates how to omit a particular argument without generating a parse error.
- In this example, full tags are displayed with post counts, no HTML is added before the tag names, a line break is added after each tag, and no tags are excluded.
- <?php if(function_exists(‘TLW_direct’)) {TLW_direct(“0″,”on”,”",”<br />”,”");} ?>
- The following examples demonstrates how specific tags (general and uncategorized in this case) can be excluded. All other arguments mirror the preceding example.
<?php if(function_exists('TLW_direct')) {TLW_direct("0","on","","<br />","general,uncategorized");} ?>
- If not using a widget-enabled theme, insert the function
- If the function is called directly, can tags be excluded?
- To exclude tags when using the
TLW_directfunction, enter a comma-separated list of tag slugs in the last argument of the function. The preceding FAQ more fully demonstrates this.
- To exclude tags when using the
- If the function is called directly, can I display post counts?
- Yes, to display post counts when using the
TLW_directfunction, set the second argument to “on”.Conversely, to prevent post counts from displaying, simply enter two quotation marks as the second function argument.
- Yes, to display post counts when using the
- I would rather display my tags in a dropdown menu. Is this an option?
- To display tags as a dropdown, see my Tag Dropdown Widget, available in the WordPress Plugin repository at http://wordpress.org/extend/plugins/tag-dropdown-widget/.
- Where can I get more help?
- For support, visit the plugin homepage at http://www.ethitter.com/plugins/tag-list-widget/.
Changelog
- 0.3
- Reduced variables stored in database to two.
- 0.2
- Added function
TLW_direct
- Added function
