diff --git a/system/includes/functions.php b/system/includes/functions.php index 7d08e95..b2157bd 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -424,6 +424,18 @@ function get_keyword($keyword){ $arr = explode('', $content); $post->title = str_replace('

','',$arr[0]); $post->body = $arr[1]; + + // Get first and last post + if ($index == 0) { + $post->cls = 'item first'; + } + elseif ($index == count($posts) - 1) { + $post->cls = 'item last'; + } + else { + $post->cls = 'item'; + } + $tmp[] = $post; }