Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.
This repository was archived by the owner on Dec 13, 2022. It is now read-only.

Check languages->count rather than multilang for when to add hreflang's to sitemap #41

@shoesforindustry

Description

@shoesforindustry

We often have the situation where we have a language file (site/languages/en.php) for string variables, even when we are only using a single language. It likely that the site will become multilingual at a later date... but we would not want the extra hreflang stuff in the sitemap for just one lang at the present time.

In xmlsitemap.php on line 278 you test for languages with:
if ( kirby()->multilang() == true )
This will add hreflang to the sitemap if we have just one language file.

Maybe use languages count instead?
if ( kirby()->languages()->count() >1 )
This will add NOT add hreflang to the sitemap if we have just one language file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions