Add Shortcode to WordPress

Red_eyed_tree_frog_edit2[1]

13 May 2014 Author

A Shortcode is a simple way to add macro code to WordPress post and pages through editor. You can create your own, with your code in function.php file.

You simply add:

//[foobar]
function foobar_func( $atts ){
	/* Your code here */
}
add_shortcode( 'foobar', 'foobar_func' );

to functions.php file and this will work with [foobar] shortcode!
More about this here

Bye.

Wordpress

Comments are closed.