SEO + UX: schema.org JSON-LD, sitemap fix, persistent topbar, POST-only rate limit
- Add schema.org JSON-LD to page, service, and location templates (LocalBusiness / Service / FAQPage) - Inject schema_json via _header.php <script type="application/ld+json"> block - Fix sitemap.xml: replace 10 stale .html refs with trailing-slash URLs, add /blog/, update lastmod - nginx: rate-limit /contact/ POST-only via map $request_method (GET no longer hits 429) - Topbar: remove dismiss button, always visible for session; popup close no longer hides topbar Verified: all 17 routes 200, JSON-LD present on home/service/location/contact, sitemap 17 URLs no .html Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,25 @@ $body = json_decode($loc['body_json'] ?? '{}', true) ?? [];
|
||||
$faqs = json_decode($loc['faqs_json'] ?? '[]', true) ?? [];
|
||||
$city = $loc['city'];
|
||||
|
||||
$schema_json = json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'HomeAndConstructionBusiness',
|
||||
'name' => 'Floor It Hardwood Floors',
|
||||
'url' => 'https://floorithardwoodfloors.com',
|
||||
'telephone'=> '+17166021429',
|
||||
'address' => [
|
||||
'@type' => 'PostalAddress',
|
||||
'addressLocality' => $loc['city'],
|
||||
'addressRegion' => 'NY',
|
||||
'addressCountry' => 'US',
|
||||
],
|
||||
'areaServed' => [
|
||||
'@type' => 'City',
|
||||
'name' => $loc['city'],
|
||||
],
|
||||
'description' => $loc['meta_description'],
|
||||
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
|
||||
require __DIR__ . '/../components/_header.php';
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user