Simple:Press Documentation

Template Tag: Forum Dropdown

The Template Tag Forum Dropdown displays displays a drop-down of links to forums.

This template tag is included in the Template Tags and Widgets plugin available on the Simple:Press Our Plugin Library page.

The function used is sp_ForumDropdownTag(() and the file that makes the magic happen is sp-ForumDropdown-tag.php which is located in the plugin’s template-tags/library folder.

You can pass optional arguments to the function for formatting and display.


  • tagId – unique id to use for div or list. The format is text and the default is spAdminModeratorOnlineTag
  • tagClass – class to be applied for styling. The format is text and the default is spListTag
  • selectClass – class to be applied to select control. The format is text and the default is spSelectTag
  • forumList – ID’s of forums (comma delimited in quotes) or 0 for all. Default is all.
  • label – Text label to display. The format is text and the default is “Select forum”.
  • length – Length of title in select. This would be a number. The default is 30.
  • echo – echo content or return content. True/false and the default is true.

NOTE: True must be expressed as a 1 and False as a zero


An example of using this tag with the default settings.

<?php sp_ForumDropdownTag();?>

An example of using this tag with the length of the title text set at 20.

<?php sp_ForumDropdownTag('length=20');?>

You can also call this function by using a shortcode on pages, posts or widgets.


Note: Forum visibility rules apply.  Only forums that user has access to will be shown.
The Using Plugins page describes how you obtain and install the Template Tags plugin. Once installed you would activate it from the Simple:Press administration page Available “Plugins – Install Simple:Press Plugins”

More Topics In SimplePress: Plugins

Copyright © 2006-2019 Simple:Press. All Rights Reserved.