// Add Shortcode function custom_shortcode( $atts , $content = null ) { // Attributes $atts = shortcode_atts( array( 'var1' => '12', 'var2' => '345', 'var3' => '456', ), ); $output = $var1; $output .= $var2; $output .= $var3; $output .= $content; return $output; } add_shortcode( 'test', 'custom_shortcode' );