The Link shortcode handles a generic link which can be enriched by an icon. Here is a live example:


The link shortcode, shown above, is defined by the following definition:

[g-link url="" menu="Products" icon="cog"][/g-link]

And here is another example:


and this is the shortcode definition:

[g-link url="" menu="Products" icon="cog" stacked=true icon_container=circle-o icon_type=fontawesome][/g-link]

Shortcode parameters

The [g-link] shortcode has some optional parameters:

  • name - defines an unique component name.
  • url - defines the link url.
  • menu - defines the link menu label.
  • icon_type - defines the icon set type. By default it displays glypicons icons and accepts fontawesome as alternative icon set.
  • icon - defines the icon name without any prefix.
  • icon_container - defines the container icon name without any prefix. It works only when fontawesome icon set is used and stacked option is set to true.
  • stacked - renders the icon as stacked when true. Valid values are true|false. By default this value is set to false.
  • attributes - defines extra attributes you can add to your shortcode. Attributes is a string of HTML key:value tokens, separated by commas. A valid attributes value is attributes=class:myclass, rel:my-rel".

Next Post Previous Post