Shortcodes – Miscellaneous

Dropcap

Start a paragraph by adding .dropcap to any text character. Using the dropcap shortcode applies this class to the wrapped text.

Code Example

[dropcap]M[/dropcap]y intro text to be styled

Parameters

Parameter Description Required Values Default
class Any extra classes you want to add optional any text none
data Data attribute and value pairs separated by a comma. Pairs separated by pipe. optional any text none

Output:

My intro text to be styled


Intro/Lead Text

Make a paragraph stand out by adding .lead to any section of text. Using the lead shortcode applies this class to the wrapped text.

Code Example

[lead]My intro text to be styled[/lead]

Parameters

Parameter Description Required Values Default
class Any extra classes you want to add optional any text none
data Data attribute and value pairs separated by a comma. Pairs separated by pipe. optional any text none

Output:

My intro text to be styled


Email Encode

Create an email link that will be encoded before being output on the screen. This makes it difficult for bots to crawl the email address and send spam messages. The wrapped email address will be used as the link or the email address can be specified in the url parameter to link the wrapped content.

Code Example

[email url="email@address.com"]My Email[/email]

or

[email]email@address.com[/email]

Parameters

Parameter Description Required Values Default
url The url you want the email to link to; if none is provided it will default to what's inside the brackets optional any text none
class Any extra classes you want to add optional any text none
data Data attribute and value pairs separated by a comma. Pairs separated by pipe. optional any text none

Output:

My Email

or

email@address.com

Divider

Using the divider shortcode creates a full-width, bold line on the page.

Code Example

[divider][/divider]
[divider]Text[/divider]
[divider][icon type="pacman" color="#FFEE00" size="20px" url="" target="_self" class=""][/divider]

Parameters

Parameter Description Required Values Default
class Any extra classes you want to add optional any text none
data Data attribute and value pairs separated by a comma. Pairs separated by pipe. optional any text none

Output:


Text

Styled Lists

Created stylized lists by wrapping any UL / LI group in the list shortcode with the type specified.

Code Example

[list type="i.e. list-inline, list-unstyled, list-columned, list-ordered, list-unordered"]
  • List Item #1
  • List Item #2
  • List Item #3
[/list]

or

[list-unordered]
  • List Item #1
  • List Item #2
  • List Item #3
[/list-unordered]

or

[list-ordered]
  • List Item #1
  • List Item #2
  • List Item #3
[/list-ordered]

or

[list-unstyled]
  • List Item #1
  • List Item #2
  • List Item #3
[/list-unstyled]

or

[list-columned]
  • List Item #1
  • List Item #2
  • List Item #3
[/list-columned]

or

[list-inline]
  • List Item #1
  • List Item #2
  • List Item #3
[/list-inline]

Parameters

Parameter Description Required Values Default
type Use list-unordered, list-ordered, list-unstyled, list-columned, or list-inline to set the style of the list. optional any text none
class Any extra classes you want to add optional any text none
data Data attribute and value pairs separated by a comma. Pairs separated by pipe. optional any text none

Output:

  • List Item #1
  • List Item #2
  • List Item #3

or

  • List Item #1
  • List Item #2
  • List Item #3

or

  • List Item #1
  • List Item #2
  • List Item #3

or

  • List Item #1
  • List Item #2
  • List Item #3

or

  • List Item #1
  • List Item #2
  • List Item #3

Use the menu shortcode to output any menu created in the admin panel -> Appearance -> Menus.

Code Example

[menu menu="default"]

Parameters

Parameter Description Required Values Default
menu he menu that is desired; accepts (matching in order) id, slug, nam. optional any text none
container Whether to wrap the ul, and what to wrap it with. Allowed tags are div and nav. Use false for no container e.g. 'container' => false optional any text none
container_class The class that is applied to the container. optional any text none
container_id The ID that is applied to the container. optional any text none
menu_class The class that is applied to the ul element which encloses the menu items. Multiple classes can be separated with spaces. Formerly known as $wrap_class. optional any text none
menu_id The ID that is applied to the ul element which encloses the menu items. Formerly known as $wrap_id. optional any text none
echo Whether to echo the menu or return it. For returning menu use '0' optional any text true
fallback_cb If the menu doesn't exist, the fallback function to use. Set to false for no fallback. Note: Passes $args to the custom function. optional any text wp_page_menu
before Output text before the <a> of the link. optional any text none
after Output text after the </a> of the link. optional any text none
link_before Output text before the link text. optional any text none
link_after Output text after the link text. optional any text none
depth How many levels of the hierarchy are to be included where 0 means all. -1 displays links at any depth and arranges them in a single, flat list. optional any text 0
walker Custom walker object to use (Note: You must pass an actual object to use, not a string). optional any text none
theme_location The location in the theme to be used--must be registered with register_nav_menu() in order to be selectable by the user. optional any text none

Output


Become a Contributing Sponsor

Become a part of projects that need your support.