and like us on FB

The super simple shortcode on this page will show you how to easily apply a highlighter effect over your text. The highlight and font color can be altered if required, as can the text span padding.


The function requires opening and closing [highlight] tags around the content you would like the effect applied to. For example, default usage of just [highlight]Lorem Ipsum[/highlight] results in Lorem Ipsum.

The text of [highlight color="black" font="#ffffff" left="7" right="7"]Lorem Ipsum[/highlight] would be rendered as Lorem Ipsum. (in this case we’re applying a 7px pad to the left and right of text).

Video Demonstration

While the video makes mention of a standalone plugin (that you may download below) we would recommend using our custom functions plugin for short snippets.

Shortcode Attributes


The highlight color should be an an allowed color name or a HEX color code with a leading ‘#’.


The font should be an an allowed color name, or a HEX color code (with a leading ‘#’).

top, right, bottom & left

The top, right, bottom & left relates to the padding of the highlight color around the text. If required it can be altered (without px or em).

Shortcode Function

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

If you require shortcode to work in a sidebar widget, you'll have to enable the functionality with a filter. If you're using our custom functions plugin, you'll have that feature enabled by default.


Download: Shortcode (V) | WP Plugin (V) |

Shortt URL for this post: