Href lang code for sites in different countries

Hey guys,

I saw a discussion here regarding Href lang for multiple countries but it wasn’t actually answered. Just wondering if there’s any solution other than manually adding the href lang code in every single pages.

Normally in wordpress, they have a dynamic code you can include in the site-wide settings like this:
<link rel=”alternate” href=”https://www.collectivecampus.com.au<?php echo parse_url($_SERVER[‘REQUEST_URI’],PHP_URL_PATH); ?>” hreflang=”en-au” />

” hreflang=”en-sg” />

But this doesn’t work on webflow so I’m wondering if there’s an alternative. This is mainly for our SEO.

You cannot run PHP (or any other server-side) code in Webflow, and there is no variable you can use to get the current page URL. So, no workaround at all if you are hosting with Webflow.

<?php echo parse_url($SERVER[‘REQUESTURI’],PHP_URL_PATH); ?>