skip to Main 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 Parameters:

Below are the parameters accepted by the shortcode (note they are all optional).

Attribute Description Default
type item type (currently only accepts “login” as an option to display a login/logout link) null
icon icon name to display an icon before the text null
icon_logged_in icon to display when logged in null
text display text
text_logged_in display text when logged in
link custom link to add to the item null
link_target link target attribute value self
link_rel link rel attribute value null
login_redirect custom log in redirect when using the login type null
logout_redirect custom log out redirect when using the login type home url
spacing custom spacing between this item and another 20
class can be used to add extra classnames to the element null
Back To Top