Portfolio Snippets on Home Page 1

You currently own this topic would you like to Unclame it?

This topic contains 6 replies, has 2 voices, and was last updated by Livemesh livemesh 6 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #610
    Avatar
    Shane

    Hi Support,

    Just an enquiry regarding the layout of the portfolio snippets on Home Page 1. Is there any way of fitting 5 columns (5 snippets) neatly in 1 row and have the ‘snippets’ size themselves to suit?

    I have edited the short code for Home Page 1 to layout ‘5 columns’ and ‘5 posts’ but the resulting layout is always a maximum of 3 columns (so for 5 posts it will display a row of 3 and a row of 2).

    Apologies if this is a n00bish enquiry, but it’s driving me insane. Thanks in advance for your help.

    Shane.

    #619
    Livemesh
    livemesh
    Keymaster
    Post count: 1011

    Not well documented – my mistake, the number of columns possible are 2,3 and 4 (6 is possible too but would be too small and hence not supported). Since we move to a twelve column grid, 5 equal sized columns require custom CSS and hence I stopped supporting it.

    Let me know if you still need it and I can come up with some custom code to help achieve it. Thanks

    #705
    Avatar
    Shane

    Thank you for your reply, I would be VERY appreciative if you could help with some coding for a five column row. I apologise for being a nuisance but it does make a big difference to the aesthetics of my layout.

    Thank you sooooooooo much for your help.

    Shane.

    #727
    Livemesh
    livemesh
    Keymaster
    Post count: 1011

    Pls give me a day or two and I will send across this to you. Thanks

    #781
    Livemesh
    livemesh
    Keymaster
    Post count: 1011

    Here is solution to the problem you are facing –

    Pls modify the file [theme-directory]/framework/functions/utility-functions.php and change the php function below to following –

    function mo_get_column_style($column_count = 2) {
        $style_class = '';
        switch ($column_count) {
            case 2:
                $style_class = "sixcol";
                break;
            case 3:
                $style_class = "fourcol";
                break;
            case 4;
                $style_class = "threecol";
            case 5;
                $style_class = "one-fifth";
        }
        return $style_class;
    }
    

    Next, to the custom.css file or the Custom CSS tab in theme options, pls input the following code –

    .one-fifth { width: 18.4%; margin-right: 2%;float: left; min-height: 1px;}
    

    and now when you use something like –

    [show_post_snippets post_type="portfolio" number_of_columns=5 post_count=10 image_size="small" show_meta=false layout_class="post-snippets full-width-snippets" display_text=false]
    

    you should see five columns aligned along a single row.

    #788
    Avatar
    Shane

    ABSOLUTELY PERFECT. I could KISS you!!!! MWAH

    Thank you so much, the support you provide and the speed at which you provide it is not a common or expected thing.

    You guys are doing things right, I’ll be back and I’ll also be spreading the word.

    Thanks again.

    Shane.

    #793
    Livemesh
    livemesh
    Keymaster
    Post count: 1011

    Glad it helped. Thanks for the kind words.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.