Three Rows and Three Columns?
-
Scripting isn’t my strong suit, just trying to edit a theme to better fit my needs.
So the issue is that I want my content to appear in only three rows and three columns. The plugin already has a preset for three columns, but I want to restrict it to only three rows as well. What do I need to modify?
Here’s the code:
`<?php
// Determine column/image size front page
$cols = ‘3’;
$cols = get_option(‘woo_cols’);
$r1 = 3; $r2 = 2;
if (get_option(‘woo_ratio1’)) $r1 = get_option(‘woo_ratio1’);
if (get_option(‘woo_ratio2’)) $r2 = get_option(‘woo_ratio2’);
if ( $cols == “1”) {
$class = “one”; $width = 940; $height = $width / $r1 * $r2;
} elseif ( $cols == 2 ) {
$class = “two”; $width = 460;
} elseif ( $cols == 3 ) {
$class = “three”; $width = 300;
} elseif ( $cols == 4 ) {
$class = “four”; $width = 220;
} elseif ( $cols == 5 ) {
$class = “five”; $width = 172;
}
$height = $width / $r1 * $r2;
$height = round($height);
?>’
- The topic ‘Three Rows and Three Columns?’ is closed to new replies.