// Add Shortcode function columns_shortcode( $atts , $content = null ) { // Attributes $atts = shortcode_atts( array( 'centered' => 'no', 'padding' => '0', 'gutter' => 'yes', ), ); if ($a['centered'] == "yes") {$centered = 'centered';} if ($a['padding'] == "yes") {$padding = 'padding: ' . $a['padding'] . '; ';} $style = 'style="' . $padding . '"'; $output = ''; $output .= '<div class="row' . $centered . '" ' . $style . '>'; $output .= do_shortcode($content); $output .= '</div>'; return $output; } add_shortcode( 'columns', 'columns_shortcode' );