added date and author to news in sidebar
This commit is contained in:
@@ -217,9 +217,12 @@ $news_items = $stmt->fetchAll();
|
||||
<?php else: ?>
|
||||
<?php foreach ($news_items as $news): ?>
|
||||
<div class="news-item">
|
||||
<span class="news-date"><?= date('d.m.Y', strtotime($news['published_at'])) ?></span>
|
||||
<h3><?= htmlspecialchars($news['title']) ?></h3>
|
||||
<p><?= nl2br(htmlspecialchars($news['content'])) ?></p>
|
||||
<span class="news-date">
|
||||
<?= htmlspecialchars($news['author_name']) ?>
|
||||
· <?= date('d.m.Y', strtotime($news['published_at'])) ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user