Hello everybody I'm having a big issue trying to solve this. I know that I have to use JavaScript but I just can't understand how to. This is my script:
<?php
$posts = query_posts('order=DESC&cat=-2');
$cols = 4;
$filas = array_chunk($posts, $cols);
$columnas = array();
foreach( $filas as $row => $articulos ) {
foreach( $articulos as $ix => $articulo ) {
$columnas[$ix] = isset($columnas[$ix]) ? $columnas[$ix] : array();
$columnas[$ix][] = $articulo;
}
}
?>
<?php foreach($columnas as $posts):?> etc, etc ... <?php endforeach; ?>
Where $cols value will be changing according user's window screen. I.E. = If the window screen is (some value) then $cols = (some value)
I will really appreciate any help on this.
Cheers!