Title: Inner row ?
Last modified: August 21, 2016

---

# Inner row ?

 *  Resolved [keving1](https://wordpress.org/support/users/keving1/)
 * (@keving1)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/)
 * Hello,
 * I can’t use inner row.
 * Every time I put a [row] inside a column it breaks 🙁 So the nesting column is
   impossible…
 * I had the same issue trying to create my own shortcode and I was hoping you found
   the solution :-p
 * [https://wordpress.org/plugins/bootstrap-3-shortcodes/](https://wordpress.org/plugins/bootstrap-3-shortcodes/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * (@foolsrun)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624128)
 * WordPress can’t nest shortcodes of the same name (noted as a limitation in the
   Codex [here](http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes)). Unfortunately,
   because this is a limitation of WordPress and not of this plugin there isn’t 
   much we can do to fix it.
 *  Thread Starter [keving1](https://wordpress.org/support/users/keving1/)
 * (@keving1)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624129)
 * Hello,
 * Thank you for your answer.
 * Do you think it is possible to use other name for inner rows as [row_x] for exemple
   to avoid this ?
 * They talk about this : [http://www.pagelines.com/shop/plugins/grid-shortcodes/](http://www.pagelines.com/shop/plugins/grid-shortcodes/)
 * Nested Grid
 * But I don’t really know how to put that in a function 🙂
 *  Plugin Author [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * (@foolsrun)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624136)
 * We believe this would make this plugin overly complicated. We have to balance
   end-user ease with functionality and since WordPress itself doesn’t support nested
   shortcodes of the same name we’ve decided not to support them in this plugin.
 * Sorry!
 *  Thread Starter [keving1](https://wordpress.org/support/users/keving1/)
 * (@keving1)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624141)
 * I totally understand what you mean. I found the solution by adding some code 
   to yours. It’s not clean but it works for me. I’m not sure it will be for the
   en-user as you said.
 * Thanks anyway 🙂
 *  Thread Starter [keving1](https://wordpress.org/support/users/keving1/)
 * (@keving1)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624142)
 * And btw the plugin is excellent that’s why I didn’t want to use another one :-
   p
 *  Plugin Author [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * (@foolsrun)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/inner-row/#post-4624153)
 * Thank you! We appreciate your support and the review!
 *  [tasgray](https://wordpress.org/support/users/tasgray/)
 * (@tasgray)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/inner-row/#post-4624305)
 * I’ve just encountered this while using your plugin (great plugin by the way).
   While I understand your reasons for not wanting to complicate things, in my case
   it renders the plugin almost useless. Is it not possible to add the ability to
   create [row-x][/row-x] for those of us who want to get tricky?
 *  Plugin Author [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * (@foolsrun)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/inner-row/#post-4624306)
 * Thanks for your kind words!
 * We haven’t discussed nested grids in a while. I will bring it up with the other
   developers. I think it adds too much complication to the plugin and makes it 
   difficult to document, but maybe we can work something out.
 * I can’t promise we will add this feature, and it can’t say when, if ever, it’ll
   make it’s way to the WordPress.org repository, but we’ll revisit the issue.
 * Thanks again!
 *  Thread Starter [keving1](https://wordpress.org/support/users/keving1/)
 * (@keving1)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/inner-row/#post-4624307)
 * Hello,
 * This is the solution that worked for me. As I say, it’s not really clean but 
   it can do the trick.
 * add this to the bootstrap-shortcodes.php
 *     ```
       function row_inner($atts, $content = null)
       {
           return '<div class="row">' . do_shortcode($content) . '</div>';
       }
       add_shortcode('row_inner', 'row_inner');
   
       function bs_columninner( $atts, $content = null ) {
   
           extract( shortcode_atts( array(
             "lg"          => false,
             "md"          => false,
             "sm"          => false,
             "xs"          => false,
             "offset_lg"   => false,
             "offset_md"   => false,
             "offset_sm"   => false,
             "offset_xs"   => false,
             "pull_lg"     => false,
             "pull_md"     => false,
             "pull_sm"     => false,
             "pull_xs"     => false,
             "push_lg"     => false,
             "push_md"     => false,
             "push_sm"     => false,
             "push_xs"     => false,
             "xclass"      => false,
             "data"        => false
           ), $atts ) );
   
           $class  = '';
           $class .= ( $lg )             ? ' col-lg-' . $lg : '';
           $class .= ( $md )             ? ' col-md-' . $md : '';
           $class .= ( $sm )             ? ' col-sm-' . $sm : '';
           $class .= ( $xs )             ? ' col-xs-' . $xs : '';
           $class .= ( $offset_lg )      ? ' col-lg-offset-' . $offset_lg : '';
           $class .= ( $offset_md )      ? ' col-md-offset-' . $offset_md : '';
           $class .= ( $offset_sm )      ? ' col-sm-offset-' . $offset_sm : '';
           $class .= ( $offset_xs )      ? ' col-xs-offset-' . $offset_xs : '';
           $class .= ( $pull_lg )        ? ' col-lg-pull-' . $pull_lg : '';
           $class .= ( $pull_md )        ? ' col-md-pull-' . $pull_md : '';
           $class .= ( $pull_sm )        ? ' col-sm-pull-' . $pull_sm : '';
           $class .= ( $pull_xs )        ? ' col-xs-pull-' . $pull_xs : '';
           $class .= ( $push_lg )        ? ' col-lg-push-' . $push_lg : '';
           $class .= ( $push_md )        ? ' col-md-push-' . $push_md : '';
           $class .= ( $push_sm )        ? ' col-sm-push-' . $push_sm : '';
           $class .= ( $push_xs )        ? ' col-xs-push-' . $push_xs : '';
           $class .= ( $xclass )   ? ' ' . $xclass : '';
   
           $data_props = $this->parse_data_attributes( $data );
   
           return sprintf(
             '<div class="%s"%s>%s</div>',
             esc_attr( $class ),
             ( $data_props ) ? ' ' . $data_props : '',
             do_shortcode( $content )
           );
         }
       ```
   
 * Don’t forget to add ‘columninner’ to the add_shortcode function at line 65.
 *     ```
       function add_shortcodes() {
   
           $shortcodes = array(
             'alert',
             'badge',
             'breadcrumb',
             'breadcrumb-item',
             'button',
             'button-group',
             'button-toolbar',
             'caret',
             'carousel',
             'carousel-item',
             'code',
             'collapse',
             'collapsibles',
             'column',
             'columninner',
   
       ...
       ```
   
 * Then you just have to call [row_inner] and [columninner] everytime you want inner
   rows and cols 🙂
 *  Plugin Author [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * (@foolsrun)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/inner-row/#post-4624308)
 * Thanks for posting this!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Inner row ?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bootstrap-3-shortcodes_7f6b9f.svg)
 * [Bootstrap Shortcodes for WordPress](https://wordpress.org/plugins/bootstrap-3-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bootstrap-3-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [MWDelaney](https://wordpress.org/support/users/foolsrun/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/inner-row/#post-4624308)
 * Status: resolved