Skip to content

The topbar_item Shortcode

The [topbar_item] shortcode was introduced in Total 5.2 and it allows you to easily add inline items to the Top Bar content field such as phone numnber, email, login/logout link…etc. This shortcode makes it easy to display text with an icon on the side as well it ensures your top bar items render well on mobile devices when displaying multiple items.

Sample Shortcode Usage:

[topbar_item icon="envelope" text="email@example.com" link="mailto:email@example.com"]

or

[topbar_item icon="envelope" link="mailto:email@example.com"]email@example.com[/topbar_item]

Shortcode Attributes:

Below are the attributes accepted by the topbar_item shortcode:

AttributeDescriptionDefault
typeitem type (currently only accepts “login” as an option to display a login/logout link)
iconicon name to display an icon before the text
icon_logged_inicon to display when logged in
textdisplay text –
text_logged_indisplay text when logged in –
linkcustom link to add to the item
link_targetlink target attribute value
link_rellink rel attribute value
login_redirectcustom log in redirect when using the login type
logout_redirectcustom log out redirect when using the login typehome
spacingcustom spacing between this item and another20
classcan be used to add extra classnames to the element
Back To Top