Hi, I have the PHP code below which creates my blog list into rows.
How can I use UiKit to create the content output into say 3 colums or 4?
A point in the right directions would be helpful thanks.
<?php
$entries = $pages->find('template=blog-entry')->sort('-created');
$publish_date = date('Y-m-d', $page->created);
foreach($entries as $entry) {
$content .= "<a href='{$entry->url}'> <h2>{$entry->title}</h2><h4>{$publish_date}</h4></a>";
$content .= shortText($entry->body,100);
$content .= "<br><a href='{$entry->url}'> Read More </a>";
}
function shortText($text, $maxlength = 100) {
// truncate/shorten to max length
$text = substr(strip_tags($text), 0, $maxlength);
// check if we've truncated to a spot that needs further truncation
if(strlen(rtrim($text, ' .!?,;')) == $maxlength) {
// truncate to last word
$text = substr($text, 0, strrpos($text, ' '));
}
return trim($text);
}