Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19438

    I love this theme (Velvet) – thanks. One thing I want to do is have a portfolio page with rows of 6 columns (head shots of people) in addition to the normal options (1,2,3,4). I tried to modify a few of the underpinnings of the theme but I just couldn’t get it to work.

    While full instructions would be much appreciated :) at a minimum can you point me to the files I would need to modify and the basic gist of what I need to do in order to add a “6″ option in the portfolio columns configuration selector that will display 6 portfolio items across using a new custom image size (approx. 130×170 in this case…)? I was able to add the “6″ item as a new option in the select box but it didn’t seem to ‘do’ anything when I select it. I must be missing something.

    Thank you!!!

    #103694

    Hey chembro303,

    The grid is a 12 column grid so six would be possible in this instance.

    Open includes>admin>register-admin-options.php and look for:

    array(
    "slug" => "portfolio",
    "name" => "Portfolio Columns",
    "desc" => "How many columns should be displayed?",
    "id" => "portfolio_columns",
    "type" => "select",
    "std" => "4",
    "subtype" => array('1'=>'1','2'=>'2','3'=>'3','4'=>'4')),

    add a 6 option to that with:

    array(
    "slug" => "portfolio",
    "name" => "Portfolio Columns",
    "desc" => "How many columns should be displayed?",
    "id" => "portfolio_columns",
    "type" => "select",
    "std" => "4",
    "subtype" => array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','6'=>'6')),

    Then in includes>loop-portfolio.php look for:

    switch($avia_config['portfolio_columns'])
    {
    case 1: $grid = 'grid12'; $image_size = 'featured'; break;
    case 2: $grid = 'grid6'; $image_size = 'portfolio2'; break;
    case 3: $grid = 'grid4'; $image_size = 'portfolio3'; break;
    case 4: $grid = 'grid3'; $image_size = 'portfolio'; $showcaption = false; break;
    }

    add an option for the 6 option:

    switch($avia_config['portfolio_columns'])
    {
    case 1: $grid = 'grid12'; $image_size = 'featured'; break;
    case 2: $grid = 'grid6'; $image_size = 'portfolio2'; break;
    case 3: $grid = 'grid4'; $image_size = 'portfolio3'; break;
    case 4: $grid = 'grid3'; $image_size = 'portfolio'; $showcaption = false; break;
    case 6: $grid = 'grid2'; $image_size = 'portfolio'; $showcaption = false; break;
    }

    Regards,

    Devin

    #103695

    Aha! Thanks! I *almost* had it… my ignorance of how to code that PHP ‘switch’ was my downfall. I also edited functions.php to add my new image size.

    Thank you so much for the clear instructions! :)

    #103696

    Glad we could help :)

    Let us know if you have any other questions or issues.

    Regards,

    Devin

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

The topic ‘create custom column sizes’ is closed to new replies.