require_once __DIR__ . '/includes/blog-functions.php'; header('Content-Type: application/xml; charset=utf-8'); echo '' . "\n"; echo '' . "\n"; $posts = get_all_posts(false); foreach ($posts as $post) { if (!empty($post['slug'])) { $slug = htmlspecialchars($post['slug']); $published_at = !empty($post['published_at']) ? date('c', strtotime($post['published_at'])) : date('c'); echo " \n"; echo " https://nikhilsharma.digital/" . $slug . "\n"; echo " " . $published_at . "\n"; echo " weekly\n"; echo " 0.8\n"; echo " \n"; } } echo '' . "\n";