Hello There,
Thanks for writing in!
To do that, you can add the code below in your child theme’s functions.php file.
function my_custom_head_output() {
?>
<link rel="alternate" hreflang="ar-sa" href="http://example.com" />
<?php
}
add_action( 'wp_head', 'my_custom_head_output', 99999 );
You can also add hreflang tag using plugins. To do that please walk-through following blog post:
How To Add Hreflang Tags in WordPress
Hope that helps.