Return to Snippet

Revision: 34688
at October 27, 2010 05:21 by adambundy


Initial Code
// FOR THE FUNCTIONS.PHP FILE >>

function do_my_shortcode( $atts, $content = null ) {
   return '<div class="something">' . $content . '</div>';
}
add_shortcode('shortcode_label', 'do_my_shortcode');



// TO USE THE SHORTCODE >>

[shortcode_label]My Caption[/shortcode_label]

Initial URL


Initial Description


Initial Title
Wordpress Self-Closing Shortcode

Initial Tags
wordpress

Initial Language
PHP