query("
SELECT p.*, u.username AS author_name, c.name AS category_name, c.slug AS category_slug
FROM blog_posts p
JOIN users u ON u.id = p.author_id
LEFT JOIN categories c ON c.id = p.category_id
WHERE p.status = 'published'
ORDER BY p.published_at DESC
LIMIT 12
");
if ($q) {
$rows = [];
while ($r = $q->fetch_assoc()) {
$rows[] = $r;
}
if (!empty($rows)) {
$featured = $rows[0];
$latest = array_slice($rows, 1, 7);
}
}
$catQ = $conn->query('SELECT name, slug FROM categories ORDER BY sort_order ASC, name ASC');
if ($catQ) {
while ($c = $catQ->fetch_assoc()) {
$categories[] = $c;
}
}
$page_title = 'Home — Never Quit Punjabi';
$assets_prefix = '';
include __DIR__ . '/includes/header.php';
?>
“Rooted in Tradition, Rising in Punjabi.”
“Punjabi is more than a language — it’s a legacy of stories, music, and identity. We bring together tradition and today’s world, helping Punjabi grow, evolve, and shine globally.”.