Okay
  Public Ticket #1255928
help in masonry portfolio
Closed

Comments

  • Artur started the conversation

    Hello,

    Just need a little help here. Client wants the masonry grid to have 4 columns. I don't want to mess with wordpress backend so i'm planning on edit the scripts.js section. Can you explain the numbers? and a little input on how to change this to 4 columns would be appreciated. 


    if ( $('#portfolio').attr('data-col') == '2' ) {
    $('.item.wide').css( { 
    width : postWidth * 2 - 50 + 'px',
    height : postHeight - 150 + 'px',
    margin : 25 + 'px' 
    });
    $('.no-gutter .item.wide').css( { 
    width : postWidth * 2  + 'px',
    height : postHeight - 80  + 'px',
    margin : 0 + 'px'  
    });
    }




  •  1,974
    Support replied

    Hi,

    What you want to achieve require custom work. This needs a lot of js and css adjustments for 4 columns grid. Keep in mind you need to solve the responsive too.

    These are the varable who define the thumb size:

    postHeight = window.innerHeight
    postWidth = Math.floor(portfolioWidth / columnNumb)		

    You need to replace the columnNumb with 4 and do the adjustments for all item sizes. Do this only if you have good js knowledge

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy