WordPress tutorials: WordPress shortcodes

Wpsnipp – WordPress shortcodes.This is the most simple of wordpress shortcodes. Placing [mysite] within your post will be replaced by the hyperlink within the mysite function. Place this code within the functions.php of your wordpress theme.




function mysite(){
	return '<a href="http://mysite.com">visit my website</a>';
add_shortcode('mysite', 'mysite');

Be Sociable, Share!

Leave a comment