Simple:Press Documentation

Template Tag: Profile Link

The Template Tag Newest Topics displays a standard link to the current users profile form. If its not a member, for example a guest, nothing will be displayed. The output displayed will also use your theme styling..

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_ProfileLinkTag() and the file that makes the magic happen is sp-ProfileLink-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 of special text or to show/not show specific items.

Options

  • linkText – The text for link that is displayed. The default is ‘Your Profile’.
  • beforeLink – The text shown before the link that is displayed. The default is no text shown.
  • afterLink – The text shown after the link that is displayed. The default is no text shown.
  • true/false expression using 1 as true and 0 as false. The default is true.

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

Usage

An example of using this tag with only default settings.

<?php sp_ProfileLinkTag();?>

An example of using this tag with text displayed before and after the link.

<?php sp_ProfileLinkTag('beforeLink=View your&afterLink=now!');?>

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

[sp_profile_link]

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.