Okay
  Public Ticket #3561352
Portfolio grid layout when using featured videos
Closed

Comments

  • LaurentCarcelle started the conversation

    Hello,

    I haven't find any solution on the Kalium theme documentation to the following problem:

    When I use featured videos as thumbnails for some of the portfolio items, the portfolio grid layout gets all messed up : some items appear aligned on the right, sometimes a blank space is left in the middle of a row... Please see attached screenshots to understandwhat's happening. Something seems to be overflowing.

    This happens only when I use featured videos for some portfolio items. In that case, it happens anywhere I use a portfolio grid. When I only use featured still images, all items line up properly.

    Currently, all the features still images I use have the same size : 1920x1080px. The featured videos I use have the same ratio, they are all 640x360 px. And the problem also occurs when they are 1920x1080 or 960x540.

    How can I get the featured videos to work properly without messing up the portfolio grids?

    Thanks for your help.

    Attached files:  PortfolioLayoutProblem_01.jpg
      PortfolioLayoutProblem_02.jpg

  • [deleted] replied

    Hi Laurent,

    Please provide your WordPress credentials because I need to login to your site and test this. Your information is safe (private) in this thread.

    To include your credentials click the Insert Credentials button in the editor toolbar (see how)

    Thanks!

  •   LaurentCarcelle replied privately
  • [deleted] replied

    Hi Laurent,

    Thanks, can you please grant me Super Admin privileges?

    Thanks!

  • LaurentCarcelle replied

    Ok it's done. Do you think the problem comes from the way I use the theme? I haven't done any custom css or anything  outside of the regular customization options of the theme.

  • [deleted] replied

    Hi,

    I've added the following code snippet in functions.php to disable "auto positioning" of the items which breaks the correct order of how portfolio items are used to be displayed:

    // Change layout mode for portfolio to avoid incorrect positioning of portfolio items
    add_filter(
        'kalium_portfolio_container_classes',
        function( $classes ) {
            $classes[] = 'is-fitrows-layout';
            return array_diff( $classes, [ 'is-masonry-layout' ] );
        }
    );

    Here is how the items are aligned now:

    medium
    (view large image)

    Hopefully its fine now.

  • LaurentCarcelle replied

    Hi Arlind, 

    Thank you very much, everything seems to be working fine now. 

    Just a quick question : if I ever need to reinstall the theme and the problem appears again, all I would need to do is to add this code snippet to Kalium's "functions.php" to fix it?

    Thanks for your help

    Kind Regards,
    Laurent

  • [deleted] replied

    Hi Laurent,

    Yes, you can add that code again. Or, if you use a child theme, you can add that code in the functions.php of your Kalium (child theme).

    Thanks!