Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #705182

    Thank you for your time.

    I’m not sure how else to describe this, but this is what I’m trying to do:

    I have the post slider set to 4 columns on the desktop. I would like to be able to reduce the number of columns as the screen size shrinks so that the slider remains horizontal and does not go vertical. This would probably mean three at the tablet range and two for smart phones.

    I have an established child theme and a bit of css code to modify three things: meta information, socket position, and main menu font size (which is on the left).

    Thank you in advance.

    #705362

    Hope to hear from you soon. Thank you for all that you do.

    #705379

    Hey!

    You can control the size of the columns, with Media Queries

    Please do let us know if we can do anything else for you

    Cheers!
    Basilis

    #705382

    Thank you for your reply. This looks doable.

    However, what is the css code which controls the number of columns or the particular size? I’ll admit that this is a learning process.

    #705394

    Ok, so what I think needs to be adapted is the avia-content-slider so that in each section it would change from av_one_half at the smallest, then av_one_third next up and so forth with av_one_fourth and av_one_fifth.

    Using the Media Queries you gave me, what would the code look like? I understand the min-width and max-width concept here, just not how to structure it after that point.

    Thank you in advance.

    #706733

    Hi,

    Would you mind providing a precise link to your site, showing the elements in question? We need to be able to inspect them in order to help :)

    Best regards,
    Andy

    #1377678

    Hello. Did you find a solution? Thanks!

    #1377717

    The problem with this is that enfold groups the articles according to this column setting – meaning 3 columns will result in 3 articles in a slide-entry-wrap.
    Maybe the developers could think about this behavior – because it hinders exactly this layout possibility you want to achieve.

    The grouping then had to be done by flex layout

    we can have a script to reach that layout – but better would be to get it on DOM generation.

    ( this is now only done here in my example snippet for one page ( my blog page only ID: 36400 )

    function wrap_articles_in_one_flex_container(){ 
    if(is_page(36400)){
    ?>
    <script type="text/javascript">
    window.addEventListener("DOMContentLoaded", function () { 
      (function($) {
        $('.avia-content-slider-inner .slide-entry-wrap .slide-entry').each( function() {
            $(this).detach().appendTo('.avia-content-slider-inner .slide-entry-wrap:first');
        });
        $('.avia-content-slider-inner .slide-entry-wrap:empty').remove();
      })(jQuery);
    });
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'wrap_articles_in_one_flex_container');

    and for css:

    #top.page-id-36400 .avia-content-slider .slide-entry-wrap {
      display: flex;
      flex-flow: row wrap;
      justify-content: center;
    }
    
    #top.page-id-36400 .avia-content-slider .slide-entry-wrap .slide-entry {
      flex: 0 1 calc(25% - 30px);
      margin: 0 15px 30px;
      width: unset !important;
    }
    
    @media only screen and (max-width:1310px) {
      #top.page-id-36400 .avia-content-slider .slide-entry-wrap .slide-entry {
        flex: 0 1 calc(33% - 30px);
        margin: 0 15px 30px;
      }
    }
    
    @media only screen and (max-width:989px) {
      #top.page-id-36400 .avia-content-slider .slide-entry-wrap .slide-entry {
        flex: 0 1 calc(50% - 30px);
        margin: 0 15px 30px;
      }
    }
    
    @media only screen and (max-width:767px) {
      #top.page-id-36400 .avia-content-slider .slide-entry-wrap .slide-entry {
        flex: 0 1 100%;
        margin-bottom: 30px !important;
      }
    }

    adopt to your blog ID
    see here: https://webers-testseite.de/blog/

    #1377719

    EDIT: sorry i did not read carefully: – you have a content-slider !
    just a moment …

    this will be not as easy possible because the slide elments are those wrappers ( slide-entry-wrap ) – the count of articles are based on that column setting.
    A quick and dirty way ( duplicate content) for the 3 column layout would be to place a copy of your content-slider and set it for the screen-width dependency to display : none/block

    see: https://webers-testseite.de/contentslider/

    on that page you can see the setting – shrink screen width to see the 3 column layout and setting.

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