How can I define the output of shortcode attribute value?
According to Codex: function shortcode_function_name( $atts ) { $atts = shortcode_atts( array( ‘attr1’ => ”, ), $atts, ‘your-shortcode-name’ ); return ‘<div id=”‘.$atts[‘attr1′].'”>Your Predefined Content</div>’; } add_shortcode( ‘your-shortcode-name’, ‘shortcode_function_name’ ); Adding [your-shortcode-name attr1=”Value1″] to the content of any post/page will give the following output <div id=”Value1″>Your Predefined Content</div>. Adding [your-shortcode-name attr1=”Value1″] to the content of any … Read more