Simple:Press Documentation

Template Tag: Group Link

The Template Tag Group Link displays a  link to a specific group forum listing if current user has access privilege.

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_GroupLinkTag() and the file that makes the magic happen is sp-GroupLink-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 but the group ID number is required.


  • groupId – ID of the Group the link goes to. This is the group number and is required.
  • linkText – textual content of link. This is entered as text. The default is the Group Name. The placeholder %GROUPNAME% is replaced by designated group name.
  • beforeLink – Text that is shown before the link. The default is to show none.
  • afterLink – Text that is shown after the link. The default is to show none.
  • listTags – Wrap the link in li tags. This would be true or false. The default is false
  • echo is a true/false expression using 1 as true and 0 as false. The default is true.


An example of using this tag with a Group ID number of 1 would be.

<?php sp_GroupLinkTag('groupId=1'); ?>

An example of using this tag with a Group ID number of 1 and showing text before and after the link would be.

<?php sp_GroupLinkTag('groupId=1&beforeLink=Go to&afterLink=now!'); ?>

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

[sp_group_link groupid='1']

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.