I just integrated hreflang tags on a WordPress site for the first time ever. Since there is only minimal documentation online, I thought I’d provide the script to do so, here.
Just place the code in your header section of your WordPress template, which is usually header.php in your theme folder.
For reference, if you have any trouble, you’ll want to double check that your apostrophes and quotes are standard unicode, because when copy/pasted they can get adjusted to be another character that doesn’t work.
Here’s what I used for hreflang in WordPress:
I hope this helps! Good luck with your multilingual project!