I am using twitter boostrap in my recent project . I want that the post or page content will split into columns. For doing this I am declaring several shortcode like this
function two_column($atts,$content=NULL){
return ('<div class="col-md-6">'. $content .'</div>');
}
add_shortcode('two_column', 'two_column');
function three_column($atts,$content=NULL){
return ('<div class="col-md-4">'. $content .'</div>');
}
add_shortcode('column', 'three_column');
function four_column($atts,$content=NULL){
return ('<div class="col-md-3">'. $content .'</div>');
}
add_shortcode('four_column', 'four_column');
Now if I need to split content in , then I just need to this
[two_column]content in first column[/two_column]
[two_column]content in second column[/two_column]
and so on for three or four column
But I want to make a short code like this
[column count=2]Content [/column] , I will just change the value of count , and then content will automatically split .