Skip to content

Commit

Permalink
refactor: If the current route is the homepage, set the name and `a…
Browse files Browse the repository at this point in the history
…lternateName` JSON-LD for the `mainEntityOfPage` to `seomatic.site.identity.genericName` and `seomatic.site.identity.genericAlternateName` respectively, rather than the `seomatic.meta.seoTitle` ([#1482](#1482))
  • Loading branch information
khalwat committed Nov 6, 2024
1 parent 0f8c7b6 commit 08db0fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/DynamicMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ public static function handleHomepage(): void
$mainEntity = Seomatic::$plugin->jsonLd->get('mainEntityOfPage');
if ($mainEntity instanceof WebPage || $mainEntity instanceof WebSite) {
/** WebPage $mainEntity */
$mainEntity->name = "{{ seomatic.site.siteName }}";
$mainEntity->alternateName = "{{ seomatic.site.siteName }}";
$mainEntity->name = "{{ seomatic.site.identity.genericName }}";
$mainEntity->alternateName = "{{ seomatic.site.identity.genericAlternateName }}";
}
}
}
Expand Down

0 comments on commit 08db0fa

Please sign in to comment.