Is it right way to create shortcode?
The codex explain, I think, very well the creation of shortcodes http://codex.wordpress.org/Shortcode_API A very basic shortcode function foobar_func( $atts ){ return “foo and bar”; } add_shortcode( ‘foobar’, ‘foobar_func’ ); To use it, you just need to [foobar] The first parameter on add_shortcodeis the name of the shortcode function bartag_func( $atts ) { extract( shortcode_atts( array( … Read more