This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Nesting Columns of the Same Type

  • Creator
    Topic
  • #16946
    timworx
    Participant

    Is there a possible way to nest columns of the same type?
    For example, let’s say we have a column that is half the width of the content area, and within that area we have two lists, in columns. The closing code for the list columns winds up closing the column that was for the half of the content area.

    Example code:

    [raw][one_half] First outer column
    [one_half]
    First inner column
    [/one_half]
    [one_half last]
    Second inner column
    [/one_half]
    [/one_half]
    [one_half last] Last outer column[/one_half][/raw]

    Which results in:

    <div class="column grid_6"> First outer column
    <div class="column grid_6"></div><!-- .column (end) -->
    First inner column
    </div><!-- .column (end) -->
    <div class="column grid_6 last">
    Second inner column
    </div><!-- .column (end) -->
    [/one_half]
    <div class="column grid_6 last"> Last outer column</div><!-- .column (end) -->

    Any thoughts on how to make nesting of the same columns work properly?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #16947
    Jason Bobich
    Keymaster

    Hello,

    I don’t think this would work because of how WordPress parses shortcodes. When you have the first [one_half], it’s then looking for the next [/one_half] to close that instance.

    But I’m not quite sure why you’d do this. In this case, why wouldn’t you just use 1/4? 1/4 would be 1/2 of a 1/2.

    #16953
    timworx
    Participant

    Possibly – I might be missing a simpler way to do this. Linked below is an example image.
    AFAIK you would need nested [one_half] tags to achieve this, as they are percentage based and the only way to get them to line up to is to have the left div also contain the quarter sized divs (which are really half of the half sized div, ergo they’d require [one_half])

    I may be missing a much simpler way to do this, though. If so, let me know!

    http://s28.postimg.org/inn6gfsul/example.gif

    #16957
    Jason Bobich
    Keymaster

    Aw, ok I understand now. No, there wouldn’t be a way to accomplish this with shortcodes, unfortunately. You’d have to write out the HTML.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.