Before and After

Nearly all WP Symposium Pro shortcodes, when entered into a page, post or widget can include shortcode options.

Two standard shortcode options are before=”” and after=””.

These allow you to insert HTML immediately before and after the output generated by the shortcode.

For example, the [wps-avatar] will display the current user’s avatar on the screen. You would use it like this:


However, you can use the before and after shortcode options to position the avatar “floating” to the right:

[wps-avatar size="128" before="<div style='float:right'>" after="</div>"]

This is similar to:

<div style="float:right">[wps-avatar size="128"]</div>

Except that the output is shown as part of the shortcode output, adhering to rules on it’s visibility, etc.