ALM breaks grid structure (UIKIT)
-
Hello there,
first let me thank you for your plugin and all the work you put into it!
I am having a small (or bigger?) problem and maybe you can help me. If this has been answered before, please feel free to redirect me!
I am using the UIKIT CSS Framework on my theme and the part I want to query with your plugin is part of a grid layout. To have this grid working, it has to be in a certain structure, but ALM breaks this syntax as it adds some divs (or li or…) in between.
This is my repeater code, which was my query I used before:
<div class="uk-width-10-10 uk-width-small-2-4 uk-width-medium-2-4 uk-width-large-1-4 NewsItem" data-uk-filter="<?php foreach((get_the_category()) as $category) { echo $category->cat_name . ''; } ?>"> <figure class="uk-overlay uk-overlay-hover"> <?php the_post_thumbnail('frontnews'); ?> <figcaption class="uk-overlay-panel uk-flex uk-flex-center uk-flex-middle uk-text-center uk-overlay-fade uk-overlay-background"> <span class="news_flag <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ''; } ?>_flag"><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ''; } ?></span> </figcaption> <a class="uk-position-cover" href="<?php the_permalink() ?>"></a> </figure> <a class="NewsTitle" href="<?php the_permalink() ?>"> <h1><?php the_title(); ?></h1> <h2><?php the_field('subtitle'); ?></h2> </a> <div class="uk-clearfix NewsItemInfo"> <div class="uk-align-right uk-margin-remove"><?php the_time('d.m.y'); ?></div> </div> </div>
For the grid to work, it needs to be diectly at least in one div, which is:
<div class="uk-grid" data-uk-grid-match="{target:'h1',row: false}" data-uk-grid="{gutter: 0, controls: '#filter'}" data-uk-observe>
But ALM adds three divs between the repeater and the div with the “uk-grid”-class: ajax-load-more, alm-listing and alm-reveal
So the grid won’t work and the structure get lost.
Again, this is what it needs to look like:
<div class=”uk-grid”> <!– The sorounding container –>
<div class=”uk-width-1-2″>…</div> <!– The repeated container –>
</div>Is there anything I can do about it?
Thank you for your help in advance!
- The topic ‘ALM breaks grid structure (UIKIT)’ is closed to new replies.