WP2Static and Yoast Canonicals in Header

Hi, so we’re using WP2Static to create our blog internally and then integrate the content into our existing site which is on an odd legacy structure. Finally got approval and Yoast installed hoping to fix our old issues with canonicals and duplication. However, it looks like, while the Yoast plugin works properly on the wordpress/dev site , generates canonical and title in the header in the form of

<meta name="adobe-dtm-wordpress" content="true">
	<!-- This site is optimized with the Yoast SEO Premium plugin v16.4 (Yoast SEO v16.7) - https://yoast.com/wordpress/plugins/seo/ -->
	<title>title</title>
	<!-- Admin only notice: this page does not show a meta description because it does not have one, either write it for this page specifically or go into the [SEO - Search Appearance] menu and set up a template. -->
	<link rel="canonical" href="http://theurl" />
	<!-- / Yoast SEO Premium plugin. -->

But that does not get transfered to the static site.

Which setting would be blocking this in WP2Static? I’m guessing that the “remove WP Meta Tags” option is what’s blocking in since it appears to live inside a meta tag? Is the only real solution to uncheck the “Remove MEta tags” option in settings?

Or are there other things that might be blocking it that I am not thinking of?

Hi @Yev,

It seems you’re using an older version of the plugin, now renamed to Static HTML Output. Preserving canonical links was fixed in that, I believe, but may only be in the source code in GitHub.

I recommend trying the latest version of WP2Static, which is quite different, but will preserve your canonical tags:

https://wp2static.com/thanks-for-supporting

Please let me know any issues you run into.

Cheers,

Leon