wickywills
8/16/2017 - 11:51 AM

Custom shortcode

Custom shortcode

function content_columns_func($atts, $content){

  // Get any available attributes form the shortcode
  extract(shortcode_atts(array(
          'number' => ''
  ), $atts));

  // Build up the complete structure to be returned
  return do_shortcode('<div class="columns '.$number.' clearfix">'.$content.'</div>');
}
add_shortcode( 'columns', 'content_columns_func' );