Forum Replies Created
-
AuthorPosts
-
halra01Member
Thanks for the replies. At this point, I've figured out a decent solution. The problem turned out to be the nth-child selectors in the stylesheet and the following php:
function altitude_widget_area_class( $id ) { $count = altitude_count_widgets( $id ); $class = ''; if( $count == 1 ) { $class .= ' widget-full'; } elseif( $count % 3 == 1 ) { $class .= ' widget-thirds'; } elseif( $count % 4 == 1 ) { $class .= ' widget-fourths'; } elseif( $count % 2 == 0 ) { $class .= ' widget-halves uneven'; } else { $class .= ' widget-halves'; } return $class;
I wanted to find a way to reset the styling back to 1 full-width, followed by three-third widgets, indefinitely. Part of the problem was having to create all new classes for just the pricing tables, as all the other widgets share the same column width classes. Otherwise, I'm not sure what I was missing.
halra01MemberI finally figured this one out on my own, so I'll mark as resolved.
halra01MemberSo,
This theme styles the first widget as full-width and the proceeding as thirds or fourths:
function altitude_widget_area_class( $id ) { $count = altitude_count_widgets( $id ); $class = ''; if( $count == 1 ) { $class .= ' widget-full'; } elseif( $count % 3 == 1 ) { $class .= ' widget-thirds'; } elseif( $count % 4 == 1 ) { $class .= ' widget-fourths'; } elseif( $count % 2 == 0 ) { $class .= ' widget-halves uneven'; } else { $class .= ' widget-halves'; } return $class; }
However, I want to limit the styling to 1 full-width and 3 thirds and then restart that process for the next 4 widgets.
Thanks in advance for your input!
halra01MemberNever mind,
I think I see it all now. Thanks!
halra01MemberWow,
I see it now. Thanks a lot!
Another question, tough: I want the styling of the widgets to start over again after the first four. I.e: Front Page 4 section = 1 full width text widget + 3 pricing tables, and then it begins over like that with the next four text widgets.
Can this be done by modifying the the current (front-page-4) section, or do I need to add a new front-page section?
Thanks again!
-
AuthorPosts