mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
SEO overhaul: product schema, dynamic sitemap, favicon, og-image fix
- product.php: set metaTitle, metaDescription, canonicalUrl, ogImage, ogType=product, productSchema (JSON-LD with price/availability/reviews), and breadcrumbs variables for header.php to consume - sitemap.php: dynamic XML sitemap generated from DB — includes all 30 active products + static pages; robots.txt now points here - header.php: fix favicon links (favicon.ico in root + icon-192.png); fix productSchema output (was double-encoding via json_encode) - robots.txt: point Sitemap directive to /sitemap.php Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-3
@@ -54,7 +54,7 @@ $customerUser = $isLoggedIn ? CustomerAuth::getUser() : null;
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($productSchema)): ?>
|
||||
<script type="application/ld+json"><?= json_encode($productSchema,JSON_UNESCAPED_SLASHES) ?></script>
|
||||
<script type="application/ld+json"><?= $productSchema ?></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PWA Meta Tags -->
|
||||
@@ -78,8 +78,10 @@ $customerUser = $isLoggedIn ? CustomerAuth::getUser() : null;
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=<?= filemtime($_SERVER['DOCUMENT_ROOT'] . '/assets/css/style.css') ?>">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="/assets/images/logo.png" type="image/png">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/assets/images/icon-192.png">
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="/assets/images/icon-192.png">
|
||||
|
||||
<?php if (strpos($_SERVER['REQUEST_URI'], 'payment') !== false || strpos($_SERVER['REQUEST_URI'], 'checkout') !== false): ?>
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user