How to register shortcode in WordPress

Single shortcode function single_shortcode_name( $atts, $content = null ) { return ''.do_shortcode($content).''; } add_shortcode('single_shortcode', 'single_shortcode_name');   Shortcode with attributes function shortcode_with_attributes( $atts, $content = null ) {...