Okay
  Public Ticket #981180
Portfolio Two columns instead of three
Closed

Comments

  • Pablo started the conversation

    Hi, 

    Is it possible to display the portfolio in two columns instead of three?

    Thank you!

  •  8,998
    Tahir replied

    Hey Again,

    Add this into the Custom CSS box located in your Salient Options panel (Make Sure there are no red cross in the Box) :

    /* For Desktop */
    @media only screen and (max-width: 1920px) and (min-width: 990px) {
        html body .default-style .portfolio-items .col.elastic-portfolio-item {
            width: 47.6%!important;
        }
    }
    /* Mobile and Tablet size */
    @media only screen and (min-width: 1000px) {
        html body .default-style .portfolio-items .col.elastic-portfolio-item {
            width: 47.6%!important;
        }
    }

    Thanks


    ThemeNectar Support Team 

  • Pablo replied

    Hi Tahir, Thank you for your replay.

    I wanted to keep the possibility to display three columns and replace the four columns into two columns so I managed to change this css bellow but not sure if it's the proper way to do it. 

    .portfolio-items .col.span_3 {
        width: 47.6% !important;
        margin: 0px 1.1%;
        padding: 0px;
    }

    Is it correct?



  •  8,998
    Tahir replied

    Yes its correct. 

    Cheers


    ThemeNectar Support Team 

  • Pablo replied

    Thank you Tahir :)

  • Francisco replied

    Hi Tahir! I'm having the same problem. I solved the same way, but the problem is that the images are the old ones (600px width) and when I resize this the pixelation is inevitable. Is there a way to change this so I can setup a specific width in order to avoid the pixelation? I mean... make the thumbnails 960px for a HD full width portfolio?

    Thanks! 

  •  8,998
    Tahir replied

    @Francisco,

    There is a Plug-gable Function in Salient that you can use to override the image sizes : 


    Best 


    ThemeNectar Support Team 

  • Francisco replied

    Hi Tahir!

    Thank you for answering me. I found that lines in the functions.php. Should I add this block to the child theme or to the original theme? When updating the theme would be my problem...

    Thanks!

  •  8,998
    Tahir replied

    Add this in Child theme and adjust the values as per your liking .Use the Code Snippets Plugin if you dont want to install a Child Theme.

    add_action( 'after_setup_theme', 'my_child_theme_image_size' );
    function my_child_theme_image_size() {
     remove_image_size( 'portfolio-thumb' ); 
    add_image_size( 'portfolio-thumb', 1200, 806, true );
    }
    

    An update should not mess this as it will be added in Child Theme . 

    Best.


    ThemeNectar Support Team 

  • Francisco replied

    Awesome! Thanks