Children Shortcodes?

This is possible, but you can only nest one level down, after that the shortcode regexp parser flips out. So your example would be okay, but [item1] would not be able to contain even more nested shortcodes. To enable nesting, just go ahead and do: add_shortcode(‘data’, function($attributes, $content=””) { return do_shortcode($content); } Relevant article: http://www.sitepoint.com/wordpress-nested-shortcodes/

What is short code for following?

You are correct, [login_form] is the shortcode that you should use. From the Shortcode API The add_shortcode function is used to register a shortcode handler. It takes two parameters: the shortcode name (the string used in a post body), and the callback function name. From what I can understand is that the shortcode calls a … Read more

Creating custom shortcode

You are passing the parameters wrong, try with something like this: function get_telephone($attrs) { $attr = shortcode_atts( array( ‘name’ => ‘John Doe’ ), $attrs ); return attr[‘name’]; } add_shortcode( ‘telephone’, ‘get_telephone’ ); In the post you call the shortcode like this: [telephone name=”Jose”] Anyway, inside the get_telephone function you should add some logic to get … Read more

Shortcodes (with a space) added to php Sample

there isn’t an “space” in the Shortcode-Name. What you have, is an shortcode called “customcont”, that is providing an Parameter called “form”. So this is, how it should work: function example_shortcode( $atts = array(), $content=”” ) { extract( shortcode_atts( array ( ‘form’ => 0, ), $atts ) ); return ‘FORM TO DISPLAY IS #’.$form; } … Read more

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