WordPress shortcode signature

15.Sep.2010

WordPress shortcodes are powerful but rarely used functions. It is simple to use WordPress shortcodes by calling WordPress function add_shortcode. You can use it to show your sharing buttons, RSS feeds, Google AdSense or just your signature.

To make this simple function works with you – just copy following snippet into your themes functions.php file.

1
2
3
4
5
function my_signature() {
	return '<em>--<br/>WordPress shortcode signature.<br/>Bye!</em>';
}
 
add_shortcode('mys', 'my_signature');

To use it on your post – simply put “[mys]” into your post.

Example of signature achieved by WordPress shortcode:
[mys]